Skip to content

Commit

Permalink
This commit was manufactured by cvs2svn to create tag 'v4-09-00'.
Browse files Browse the repository at this point in the history
  • Loading branch information
(no author) committed Dec 9, 2007
1 parent e069490 commit 6e3b879
Show file tree
Hide file tree
Showing 29 changed files with 303 additions and 872 deletions.
363 changes: 96 additions & 267 deletions ITS/MakeITSFullMisAlignment.C

Large diffs are not rendered by default.

349 changes: 97 additions & 252 deletions ITS/MakeITSResMisAlignment.C

Large diffs are not rendered by default.

60 changes: 16 additions & 44 deletions SHUTTLE/AliShuttle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

/*
$Log$
Revision 1.66 2007/12/05 10:45:19 jgrosseo
changed order of arguments to TMonaLisaWriter
Revision 1.65 2007/11/26 16:58:37 acolla
Monalisa configuration added: host and table name
Expand Down Expand Up @@ -1461,8 +1458,8 @@ Bool_t AliShuttle::Process(AliShuttleLogbookEntry* entry)
TString lhcPeriod(GetLHCPeriod());
if (lhcPeriod.Length() == 0)
{
Log("SHUTTLE","Process - LHCPeriod not found in logbook!");
return 0;
Log("SHUTTLE","StoreRunMetaDataFile - LHCPeriod not found in logbook!");
return 0;
}

if (fgkMainCDB.Length() == 0)
Expand Down Expand Up @@ -2767,13 +2764,9 @@ void AliShuttle::Log(const char* detector, const char* message)
// Fill log string with a message
//

TString logRunDir = GetShuttleLogDir();
if (GetCurrentRun() >=0)
logRunDir += Form("/%d", GetCurrentRun());

void* dir = gSystem->OpenDirectory(logRunDir.Data());
void* dir = gSystem->OpenDirectory(GetShuttleLogDir());
if (dir == NULL) {
if (gSystem->mkdir(logRunDir.Data(), kTRUE)) {
if (gSystem->mkdir(GetShuttleLogDir(), kTRUE)) {
AliError(Form("Can't open directory <%s>", GetShuttleLogDir()));
return;
}
Expand Down Expand Up @@ -2820,12 +2813,9 @@ TString AliShuttle::GetLogFileName(const char* detector) const
TString fileName;

if (GetCurrentRun() >= 0)
{
fileName.Form("%s/%d/%s_%d.log", GetShuttleLogDir(), GetCurrentRun(),
detector, GetCurrentRun());
} else {
fileName.Form("%s/%s_%d.log", GetShuttleLogDir(), detector, GetCurrentRun());
else
fileName.Form("%s/%s.log", GetShuttleLogDir(), detector);
}

return fileName;
}
Expand Down Expand Up @@ -3085,29 +3075,20 @@ Bool_t AliShuttle::SendMail()
TString body = Form("Dear %s expert(s), \n\n", fCurrentDetector.Data());
body += Form("SHUTTLE just detected that your preprocessor "
"failed processing run %d!!\n\n", GetCurrentRun());
body += Form("Please check %s status on the SHUTTLE monitoring page: \n\n",
fCurrentDetector.Data());
body += Form("Please check %s status on the SHUTTLE monitoring page: \n\n", fCurrentDetector.Data());
body += Form("\thttp://pcalimonitor.cern.ch:8889/shuttle.jsp?time=168 \n\n");

TString logFolder = "logs";
if (fConfig->GetRunMode() == AliShuttleConfig::kProd)
logFolder += "_PROD";


body += Form("Find the %s log for the current run on \n\n"
"\thttp://pcalishuttle01.cern.ch:8880/%s/%d/%s_%d.log \n\n",
fCurrentDetector.Data(), logFolder.Data(), GetCurrentRun(),
fCurrentDetector.Data(), GetCurrentRun());
body += Form("The last 10 lines of %s log file are following:\n\n", fCurrentDetector.Data());
"\thttp://pcalishuttle01.cern.ch:8880/logs/%s_%d.log \n\n",
fCurrentDetector.Data(), fCurrentDetector.Data(), GetCurrentRun());
body += Form("The last 10 lines of %s log file are following:\n\n");

AliDebug(2, Form("Body begin: %s", body.Data()));

mailBody << body.Data();
mailBody.close();
mailBody.open(bodyFileName, ofstream::out | ofstream::app);

TString logFileName = Form("%s/%d/%s_%d.log", GetShuttleLogDir(),
GetCurrentRun(), fCurrentDetector.Data(), GetCurrentRun());
TString logFileName = Form("%s/%s_%d.log", GetShuttleLogDir(), fCurrentDetector.Data(), GetCurrentRun());
TString tailCommand = Form("tail -n 10 %s >> %s", logFileName.Data(), bodyFileName.Data());
if (gSystem->Exec(tailCommand.Data()))
{
Expand Down Expand Up @@ -3192,29 +3173,20 @@ Bool_t AliShuttle::SendMailToDCS()
TString body = Form("Dear DCS experts, \n\n");
body += Form("SHUTTLE couldn\'t retrieve the data points for detector %s "
"in run %d!!\n\n", fCurrentDetector.Data(), GetCurrentRun());
body += Form("Please check %s status on the SHUTTLE monitoring page: \n\n",
fCurrentDetector.Data());
body += Form("Please check %s status on the SHUTTLE monitoring page: \n\n", fCurrentDetector.Data());
body += Form("\thttp://pcalimonitor.cern.ch:8889/shuttle.jsp?time=168 \n\n");

TString logFolder = "logs";
if (fConfig->GetRunMode() == AliShuttleConfig::kProd)
logFolder += "_PROD";


body += Form("Find the %s log for the current run on \n\n"
"\thttp://pcalishuttle01.cern.ch:8880/%s/%d/%s_%d.log \n\n",
fCurrentDetector.Data(), logFolder.Data(), GetCurrentRun(),
fCurrentDetector.Data(), GetCurrentRun());
body += Form("The last 10 lines of %s log file are following:\n\n", fCurrentDetector.Data());
"\thttp://pcalishuttle01.cern.ch:8880/logs/%s_%d.log \n\n",
fCurrentDetector.Data(), fCurrentDetector.Data(), GetCurrentRun());
body += Form("The last 10 lines of %s log file are following:\n\n");

AliDebug(2, Form("Body begin: %s", body.Data()));

mailBody << body.Data();
mailBody.close();
mailBody.open(bodyFileName, ofstream::out | ofstream::app);

TString logFileName = Form("%s/%d/%s_%d.log", GetShuttleLogDir(), GetCurrentRun(),
fCurrentDetector.Data(), GetCurrentRun());
TString logFileName = Form("%s/%s_%d.log", GetShuttleLogDir(), fCurrentDetector.Data(), GetCurrentRun());
TString tailCommand = Form("tail -n 10 %s >> %s", logFileName.Data(), bodyFileName.Data());
if (gSystem->Exec(tailCommand.Data()))
{
Expand Down
42 changes: 5 additions & 37 deletions SHUTTLE/AliShuttleConfig.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

/*
$Log$
Revision 1.25 2007/11/26 16:58:37 acolla
Monalisa configuration added: host and table name
Revision 1.24 2007/10/24 10:44:08 acolla
debug AliInfo removed
Expand Down Expand Up @@ -522,8 +519,6 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
fPPMaxMem(0),
fMonitorHost(""),
fMonitorTable(""),
fTriggerWait(3600),
fRunMode(kTest),
fDetectorMap(),
fDetectorList(),
fShuttleInstanceHost(""),
Expand Down Expand Up @@ -967,29 +962,7 @@ UInt_t AliShuttleConfig::SetGlobalConfig(TList* list)
return 4;
}
fMonitorTable = anAttribute->GetValue();

anAttribute = anEntry->GetAttribute("triggerWait"); // MAY
if (!anAttribute) {
AliWarning(Form("triggerWait not set! default = ", fTriggerWait));
}
tmpStr = anAttribute->GetValue();
fTriggerWait = tmpStr.Atoi();

anAttribute = anEntry->GetAttribute("mode");
if (!anAttribute) {
AliWarning("Run mode not set! Running in test mode.");
}
tmpStr = anAttribute->GetValue();
if (tmpStr == "test")
{
fRunMode = kTest;
} else if (tmpStr == "prod") {
fRunMode = kProd;
} else {
AliWarning(Form("Not a valid run mode: %s", tmpStr.Data()));
AliWarning("Valid run modes are \"test\" and \"prod\". Running in test mode.");
}

return 0;


Expand Down Expand Up @@ -1207,14 +1180,10 @@ void AliShuttleConfig::Print(Option_t* option) const

TString result;
result += '\n';

TString mode = "test";
if (fRunMode == kProd) mode = "production";

result += "########################################################################\n";
result += Form(" Shuttle configuration from %s - Run Mode: <%s> \n",
fConfigHost.Data(), mode.Data());
result += "########################################################################\n";
result += "####################################################\n";
result += Form(" Shuttle configuration from %s \n", fConfigHost.Data());
result += "####################################################\n";
result += Form("\nShuttle running on %s \n", fShuttleInstanceHost.Data());

if(fProcessAll) {
Expand All @@ -1229,9 +1198,8 @@ void AliShuttleConfig::Print(Option_t* option) const
result += "\n";
}

result += Form("PP time out = %d - max PP mem size = %d KB - max retries = %d "
"- DIM trigger waiting timeout = %d\n\n",
fPPTimeOut, fPPMaxMem, fMaxRetries, fTriggerWait);
result += Form("PP time out = %d - max PP mem size = %d KB - max retries = %d\n\n",
fPPTimeOut, fPPMaxMem, fMaxRetries);
result += "------------------------------------------------------\n";

result += Form("Logbook Configuration \n\n \tHost: %s:%d; \tUser: %s; ",
Expand Down
9 changes: 0 additions & 9 deletions SHUTTLE/AliShuttleConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

class AliShuttleConfig: public TObject {
public:
enum RunMode {kTest=0, kProd};

AliShuttleConfig(const char* host, Int_t port = LDAP_PORT,
const char* binddn = 0, const char* password = 0,
const char* basedn = "o=alice,dc=cern,dc=ch");
Expand Down Expand Up @@ -60,10 +58,6 @@ class AliShuttleConfig: public TObject {
const char* GetMonitorHost() const {return fMonitorHost.Data();}
const char* GetMonitorTable() const {return fMonitorTable.Data();}

Int_t GetTriggerWait() const {return fTriggerWait;}

RunMode GetRunMode() const {return fRunMode;}

const TObjArray* GetDetectors() const;

Bool_t HasDetector(const char* detector) const;
Expand Down Expand Up @@ -200,9 +194,6 @@ class AliShuttleConfig: public TObject {

TString fMonitorHost; // host of the MonaLisa monitoring server
TString fMonitorTable; // Monalisa's SHUTTLE table name

Int_t fTriggerWait; // time to wait for DIM trigger before starting new collection
RunMode fRunMode; // Working mode (0=test; 1=prod)

TMap fDetectorMap; // Map of the detector-by-detector configuration
TObjArray fDetectorList; // List of detectors with valid configuration
Expand Down
19 changes: 1 addition & 18 deletions SHUTTLE/AliShuttleTrigger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@

/*
$Log$
Revision 1.13 2006/11/16 16:16:48 jgrosseo
introducing strict run ordering flag
removed giving preprocessor name to preprocessor, they have to know their name themselves ;-)
Revision 1.12 2006/10/20 15:22:59 jgrosseo
o) Adding time out to the execution of the preprocessors: The Shuttle forks and the parent process monitors the child
o) Merging Collect, CollectAll, CollectNew function
Expand Down Expand Up @@ -127,7 +123,6 @@ AliShuttleTrigger::AliShuttleTrigger(const AliShuttleConfig* config,
// localStorage (local) CDB storage to be used if mainStorage is unavailable
//

if (!fConfig->IsValid()) AliFatal("********** !!!!! Invalid configuration !!!!! **********");
fShuttle = new AliShuttle(config, timeout, retries);

TerminateSignalHandler* fQuitSignalHandler = new TerminateSignalHandler(this, kSigQuit);
Expand Down Expand Up @@ -196,15 +191,12 @@ void AliShuttleTrigger::Run() {

DATENotifier* notifier = new DATENotifier(this, "/DATE/LOGBOOK/UPDATE");

Int_t nTry=0;

while (1) {

fMutex.Lock();

while (!(fNotified || fTerminate)) {
if (fCondition.TimedWaitRelative(1000*fConfig->GetTriggerWait()) == 1)
break; // 1 = timeout
fCondition.Wait();
}

fNotified = kFALSE;
Expand All @@ -215,15 +207,6 @@ void AliShuttleTrigger::Run() {
AliInfo("Terminated.");
break;
}

// TODO Check this!
//nTry++;
//AliInfo(Form("Received %d triggers so far", nTry));
//if(nTry>5)
//{
// AliInfo("Collect() ran more than 5 times -> Exiting!");
// break;
//}

Collect();
}
Expand Down
3 changes: 1 addition & 2 deletions SHUTTLE/schema/Global.ldif
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ ppMaxMem: 2097152
ppMaxRetries: 2
monitorHost: aliendb1.cern.ch
monitorTable: SHUTTLE
triggerWait: 10
mode: test

5 changes: 1 addition & 4 deletions SHUTTLE/schema/shuttle.schema
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,13 @@ attributetype ( GLOBAL_CONFIG:10 NAME 'ppTimeOut' DESC 'seconds before pp a
attributetype ( GLOBAL_CONFIG:11 NAME 'ppMaxMem' DESC 'max pp mem consumption (KB)' EQUALITY caseIgnoreMatch SUP name SINGLE-VALUE )
attributetype ( GLOBAL_CONFIG:12 NAME 'monitorHost' DESC 'monitoring server host' EQUALITY caseIgnoreMatch SUP name SINGLE-VALUE )
attributetype ( GLOBAL_CONFIG:13 NAME 'monitorTable' DESC 'monitoring table name' EQUALITY caseIgnoreMatch SUP name SINGLE-VALUE )
attributetype ( GLOBAL_CONFIG:14 NAME 'triggerWait' DESC 'max time waiting for next trigger before starting a new collection'
EQUALITY integerMatch SUP uidNumber SINGLE-VALUE )
attributetype ( GLOBAL_CONFIG:15 NAME 'mode' DESC 'production mode (test, prod)' EQUALITY caseIgnoreMatch SUP name SINGLE-VALUE )

objectclass ( GLOBAL_CONFIG
NAME 'globalConfig'
DESC 'ALICE: settings for DAQ logbook access'
SUP top
MUST (name $ daqLbHost $ daqLbUser $ daqLbPasswd $ daqLbDB $ daqLbTable $ shuttleLbTable $ runTypeLbTable $ ppMaxRetries $ ppTimeOut $ ppMaxMem $ monitorHost $ monitorTable)
MAY ( daqLbPort $ triggerWait $ mode) )
MAY ( daqLbPort ) )


objectidentifier INSTANCE_CONFIG SHUTTLE_BASE:5
Expand Down
2 changes: 0 additions & 2 deletions SHUTTLE/schema_prod/Global.ldif
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ ppMaxMem: 2097152
ppMaxRetries: 2
monitorHost: aliendb1.cern.ch
monitorTable: SHUTTLE_PROD
triggerWait: 3600
mode: prod

38 changes: 18 additions & 20 deletions STEER/AliQA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,23 @@


ClassImp(AliQA)
AliQA * AliQA::fgQA = 0x0 ;
TFile * AliQA::fgQADataFile = 0x0 ;
TString AliQA::fgQADataFileName = "QA" ; // will transform into Det.QA.run.cycle.root
TFile * AliQA::fgQARefFile = 0x0 ;
TString AliQA::fgQARefDirName = "" ;
TString AliQA::fgQARefFileName = "QA.root" ;
TFile * AliQA::fgQAResultFile = 0x0 ;
TString AliQA::fgQAResultDirName = "" ;
TString AliQA::fgQAResultFileName = "QA.root" ;
TString AliQA::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
"ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT"} ;
TString AliQA::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
const TString AliQA::fkgLabLocalFile = "file://" ;
const TString AliQA::fkgLabLocalOCDB = "local://" ;
const TString AliQA::fkgLabAliEnOCDB = "alien://" ;
const TString AliQA::fkgRefFileName = "QA.root" ;
const TString AliQA::fkgQAOCDBDirName = "QA" ;
const TString AliQA::fkgRefOCDBDirName = "Ref" ;
const TString AliQA::fkgQARefOCDBDefault = "local://$ALICE_ROOT" ;
AliQA * AliQA::fgQA = 0x0 ;
TFile * AliQA::fgQADataFile = 0x0 ;
TString AliQA::fgQADataFileName = "QA" ; // will transform into Det.QA.run.cycle.root
TFile * AliQA::fgQARefFile = 0x0 ;
TString AliQA::fgQARefDirName = "" ;
TString AliQA::fgQARefFileName = "QA.root" ;
TFile * AliQA::fgQAResultFile = 0x0 ;
TString AliQA::fgQAResultDirName = "" ;
TString AliQA::fgQAResultFileName = "QA.root" ;
TString AliQA::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
"ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT"} ;
TString AliQA::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
const TString AliQA::fkgLabLocalFile = "file://" ;
const TString AliQA::fkgLabLocalOCDB = "local://" ;
const TString AliQA::fkgLabAliEnOCDB = "alien://" ;
const TString AliQA::fkgRefFileName = "QA.root" ;
const TString AliQA::fkgRefOCDBDirName = "QA/Ref" ;
//____________________________________________________________________________
AliQA::AliQA() :
TNamed("", ""),
Expand Down Expand Up @@ -454,7 +452,7 @@ void AliQA::SetQARefStorage(const char * name)
if ( fgQARefDirName.Contains(fkgLabLocalFile) )
fgQARefFileName = fkgRefFileName ;
else if ( fgQARefDirName.Contains(fkgLabLocalOCDB) )
fgQARefFileName = fkgQAOCDBDirName ;
fgQARefFileName = fkgRefOCDBDirName ;
else {
printf("ERROR: %s is an invalid storage definition\n", name) ;
fgQARefDirName = "" ;
Expand Down
6 changes: 1 addition & 5 deletions STEER/AliQA.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ class AliQA : public TNamed {
static TFile * GetQADataFile(const char * fileName) ;
static TFile * GetQAResultFile() ;
static const char * GetQAResultFileName() { return (fgQAResultDirName + fgQAResultFileName).Data() ; }
static const char * GetQARefDefaultStorage() { return fkgQARefOCDBDefault.Data() ; }
static const char * GetQARefFileName() { return fgQARefFileName ; }
static const char * GetQARefStorage() { return fgQARefDirName.Data() ; }
static const char * GetQAOCDBDirName() { return fkgQAOCDBDirName.Data() ; }
static const char * GetRefOCDBDirName() { return fkgRefOCDBDirName.Data() ; }
static const char * GetQARefOCDBDirName() { return fkgRefOCDBDirName .Data() ; }
const Bool_t IsSet(DETECTORINDEX det, ALITASK tsk, QABIT bit) const ;
void Set(QABIT bit) ;
static void SetQAResultDirName(const char * name) ;
Expand Down Expand Up @@ -101,9 +99,7 @@ class AliQA : public TNamed {
static const TString fkgLabLocalOCDB ; //! label to identify a file as local OCDB
static const TString fkgLabAliEnOCDB ; //! label to identify a file as AliEn OCDB
static const TString fkgRefFileName ; //! name of Reference File Name
static const TString fkgQAOCDBDirName ; //! name of Reference directory name in OCDB
static const TString fkgRefOCDBDirName ; //! name of Reference directory name in OCDB
static const TString fkgQARefOCDBDefault; //! default storage for QA in OCDB

ClassDef(AliQA,1) //ALICE Quality Assurance Object
};
Expand Down
Loading

0 comments on commit 6e3b879

Please sign in to comment.