AliShuttleLogbookEntry::AliShuttleLogbookEntry() :
TObject(),
fRun(-1),
-fRunParameters(0)
+fRunParameters(0),
+fDATestMode(kFALSE)
{
- // default constructor
+ //
+ // default constructor
+ //
const UInt_t nDet = AliShuttleInterface::NDetectors();
memset(fDetectorStatus, kUnprocessed, nDet*sizeof(Status));
- for (UInt_t i=0;i<nDet;i++)
- {
- fRunType[i]="";
- }
fRunParameters.SetOwner(1);
}
AliShuttleLogbookEntry::AliShuttleLogbookEntry(Int_t run, Status* status) :
TObject(),
fRun(run),
-fRunParameters(0)
+fRunParameters(0),
+fDATestMode(kFALSE)
{
-// default constructor
+ //
+ // default constructor
+ //
const UInt_t nDet = AliShuttleInterface::NDetectors();
memset(fDetectorStatus, kUnprocessed, nDet*sizeof(Status));
if(status) SetDetectorStatus(status);
- for (UInt_t i=0;i<nDet;i++)
- {
- fRunType[i]="";
- }
fRunParameters.SetOwner(1);
}
//______________________________________________________________________________________________
AliShuttleLogbookEntry::~AliShuttleLogbookEntry() {
-// destructor
-
+ //
+ // destructor
+ //
+ fRunParameters.DeleteAll();
}
//______________________________________________________________________________________________
AliShuttleLogbookEntry::AliShuttleLogbookEntry(const AliShuttleLogbookEntry &c) :
TObject(),
fRun(c.fRun),
-fRunParameters(0)
+fRunParameters(0),
+fDATestMode(c.fDATestMode)
{
- // copy constructor
+ //
+ // copy constructor
+ //
SetDetectorStatus(c.GetDetectorStatus());
fRunParameters.SetOwner(1);
TObjString* aValue= dynamic_cast<TObjString*>(aPair->Value());
fRunParameters.Add(aKey->Clone(), aValue->Clone());
}
-
- for (UInt_t i=0;i<AliShuttleInterface::NDetectors();i++)
- {
- fRunType[i]=c.GetRunType(i);
- }
}
//______________________________________________________________________________________________
AliShuttleLogbookEntry &AliShuttleLogbookEntry::operator=(const AliShuttleLogbookEntry &c)
{
- // assigment operator
+ //
+ // assigment operator
+ //
if (this != &c)
((AliShuttleLogbookEntry &) c).Copy(*this);
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::Copy(TObject& c) const
{
- // copy function
+ //
+ // copy function
+ //
AliShuttleLogbookEntry& target = (AliShuttleLogbookEntry &) c;
}
target.SetDetectorStatus(GetDetectorStatus());
- for (UInt_t i=0;i<AliShuttleInterface::NDetectors();i++)
- {
- target.SetRunType(i, fRunType[i]);
- }
+ target.fDATestMode = fDATestMode;
}
//______________________________________________________________________________________________
AliShuttleLogbookEntry::Status AliShuttleLogbookEntry::GetDetectorStatus(Int_t detPos) const
{
-// get detector status from detector code
+ //
+ // get detector status from detector code
+ //
if(detPos < 0 || detPos >= (Int_t) AliShuttleInterface::NDetectors()) {
AliError(Form("Invalid parameter: %d", detPos));
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::SetDetectorStatus(const char* detName, Status status)
{
-// set detector status from detector code
+ //
+ // set detector status from detector code
+ //
Int_t detPos = AliShuttleInterface::GetDetPos(detName);
if(detPos<0) return;
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::SetDetectorStatus(const char* detName, const char* statusName)
{
-// set detector status from detector code
+ //
+ // set detector status from detector code
+ //
Int_t detPos = AliShuttleInterface::GetDetPos(detName);
if(detPos<0) return;
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::SetDetectorStatus(Status* status)
{
-// set detector status from detector code
+ //
+ // set detector status from detector code
+ //
for(UInt_t i=0; i < AliShuttleInterface::NDetectors(); i++){
fDetectorStatus[i] = status[i];
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::SetDetectorStatus(UInt_t detPos, Status status)
{
-// set detector status from detector code
+ //
+ // set detector status from detector code
+ //
if(detPos >= AliShuttleInterface::NDetectors()) {
AliError(Form("Shuttle has only %d subdetectors!", AliShuttleInterface::NDetectors()));
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::SetDetectorStatus(UInt_t detPos, const char* statusName)
{
-// set detector status from detector code
+ //
+ // set detector status from detector code
+ //
if(detPos >= AliShuttleInterface::NDetectors()) {
AliError(Form("Shuttle has only %d subdetectors!", AliShuttleInterface::NDetectors()));
}
}
-
-
-//______________________________________________________________________________________________
-const char* AliShuttleLogbookEntry::GetRunType(Int_t detPos) const
-{
-// get detector status from detector code
-
- if(detPos < 0 || detPos >= (Int_t) AliShuttleInterface::NDetectors()) {
- AliError(Form("Invalid parameter: %d", detPos));
- return 0;
- }
- return (fRunType[detPos].Length() > 0) ? fRunType[detPos].Data() : 0;
-}
-
-//______________________________________________________________________________________________
-void AliShuttleLogbookEntry::SetRunType(const char* detName, const char* runType)
-{
-// set detector status from detector code
-
- Int_t detPos = AliShuttleInterface::GetDetPos(detName);
- if(detPos<0) return;
- SetRunType(detPos, runType);
-}
-
-//______________________________________________________________________________________________
-void AliShuttleLogbookEntry::SetRunType(const TString* runType)
-{
-// set detector status from detector code
-
- for (UInt_t i=0; i < AliShuttleInterface::NDetectors(); i++) {
- fRunType[i] = runType[i];
- }
-}
-
-//______________________________________________________________________________________________
-void AliShuttleLogbookEntry::SetRunType(UInt_t detPos, const char* runType)
-{
-// set detector status from detector code
-
- if(detPos >= AliShuttleInterface::NDetectors()) {
- AliError(Form("Shuttle has only %d subdetectors!", AliShuttleInterface::NDetectors()));
- return;
- }
- fRunType[detPos] = runType;
-}
-
//______________________________________________________________________________________________
Bool_t AliShuttleLogbookEntry::IsDone() const{
-// return TRUE if all subdetectors are in status DONE, FAILED or INACTIVE
+ //
+ // return TRUE if all subdetectors are in status DONE, FAILED or INACTIVE
+ //
for(UInt_t i=0; i < AliShuttleInterface::NDetectors(); i++){
if(fDetectorStatus[i] == kUnprocessed) return kFALSE;
//______________________________________________________________________________________________
const char* AliShuttleLogbookEntry::GetDetectorStatusName(Status status)
{
- // returns a name (string) of the detector status
+ //
+ // returns a name (string) of the detector status
+ //
switch (status){
case kUnprocessed: return "UNPROCESSED";
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::Print(Option_t* option) const
{
- // print current shuttle logbook entry
+ //
+ // print current shuttle logbook entry
+ //
TString message = "\n*** Run parameters ***\n";
TTimeStamp startTimeStamp(GetStartTime());
for (UInt_t i=0; i < AliShuttleInterface::NDetectors(); i++)
{
- message += Form("\t%2d - %s: %s ", i, AliShuttleInterface::GetDetName(i),
+ message += Form("\t%2d - %s: %s \n", i, AliShuttleInterface::GetDetName(i),
GetDetectorStatusName(fDetectorStatus[i]));
- if (fDetectorStatus[i] == kUnprocessed && fRunType[i].Length()>0)
- {
- message += Form("\t Run type: %s \n", GetRunType(i));
- } else {
- message += "\n";
- }
}
AliInfo(Form("option: %s",option));
if(keyStr.Length()<30) message.Append(' ', 30-keyStr.Length());
message += Form("%s\n", aValue->GetName());
} else {
- message += "\tlog ...\n";
+ TString logStr(aValue->GetName(), 100);
+ message += Form("\tlog (first 100 chars) %s \n",logStr.Data());
}
}
}
- AliInfo(Form("%s",message.Data()));
+ AliInfo(message.Data());
}
//______________________________________________________________________________________________
void AliShuttleLogbookEntry::SetRunParameter(const char* key, const char* value){
-// set a run parameter (read from the DAQ logbook)
+ //
+ // set a run parameter (read from the DAQ logbook)
+ //
TObjString* keyObj = new TObjString(key);
if (fRunParameters.Contains(key)) {
}
//______________________________________________________________________________________________
const char* AliShuttleLogbookEntry::GetRunParameter(const char* key) const{
-// get a run parameter
+ //
+ // get a run parameter
+ //
TObjString* value = dynamic_cast<TObjString*> (fRunParameters.GetValue(key));
if(!value) {