]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/TestShuttle/AliTestShuttle.cxx
fix for bug #66294
[u/mrichter/AliRoot.git] / SHUTTLE / TestShuttle / AliTestShuttle.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.14  2007/08/06 12:25:47  acolla
19 Function Bool_t GetHLTStatus added to preprocessor. It returns the status of HLT
20 read from the run logbook.
21 TestShuttle setup updated.
22 TRD data point configuration updated.
23
24 Revision 1.13  2007/05/30 06:35:21  jgrosseo
25 Adding functionality to the Shuttle/TestShuttle:
26 o) Function to retrieve list of sources from a given system (GetFileSources with id=0)
27 o) Function to retrieve list of IDs for a given source      (GetFileIDs)
28 These functions are needed for dealing with the tag files that are saved for the GRP preprocessor
29 Example code has been added to the TestProcessor in TestShuttle
30
31 Revision 1.12  2007/04/27 07:06:48  jgrosseo
32 GetFileSources returns empty list in case of no files, but successful query
33 No mails sent in testmode
34
35 Revision 1.11  2007/04/04 10:33:36  jgrosseo
36 1) Storing of files to the Grid is now done _after_ your preprocessors succeeded. This is transparent, which means that you can still use the same functions (Store, StoreReferenceData) to store files to the Grid. However, the Shuttle first stores them locally and transfers them after the preprocessor finished. The return code of these two functions has changed from UInt_t to Bool_t which gives you the success of the storing.
37 In case of an error with the Grid, the Shuttle will retry the storing later, the preprocessor does not need to be run again.
38
39 2) The meaning of the return code of the preprocessor has changed. 0 is now success and any other value means failure. This value is stored in the log and you can use it to keep details about the error condition.
40
41 3) New function StoreReferenceFile to _directly_ store a file (without opening it) to the reference storage.
42
43 4) The memory usage of the preprocessor is monitored. If it exceeds 2 GB it is terminated.
44
45 5) New function AliPreprocessor::ProcessDCS(). If you do not need to have DCS data in all cases, you can skip the processing by implemting this function and returning kFALSE under certain conditions. E.g. if there is a certain run type.
46 If you always need DCS data (like before), you do not need to implement it.
47
48 6) The run type has been added to the monitoring page
49
50 Revision 1.10  2007/02/28 10:41:01  acolla
51 Run type field added in SHUTTLE framework. Run type is read from "run type" logbook and retrieved by
52 AliPreprocessor::GetRunType() function.
53 Added some ldap definition files.
54
55 Revision 1.8  2007/02/13 11:22:25  acolla
56 Shuttle getters and setters of main/local OCDB/Reference storages, temp and log
57 folders moved to AliShuttleInterface
58
59 Revision 1.6  2006/11/06 14:22:47  jgrosseo
60 major update (Alberto)
61 o) reading of run parameters from the logbook
62 o) online offline naming conversion
63 o) standalone DCSclient package
64
65 Revision 1.5  2006/10/02 12:58:52  jgrosseo
66 Small interface change in StoreReferenceData
67
68 Revision 1.4  2006/08/08 14:19:07  jgrosseo
69 Update to shuttle classes (Alberto)
70
71 - Possibility to set the full object's path in the Preprocessor's and
72 Shuttle's  Store functions
73 - Possibility to extend the object's run validity in the same classes
74 ("startValidity" and "validityInfinite" parameters)
75 - Implementation of the StoreReferenceData function to store reference
76 data in a dedicated CDB storage.
77
78 Revision 1.3  2006/07/11 12:44:32  jgrosseo
79 adding parameters for extended validity range of data produced by preprocessor
80
81 Revision 1.2  2006/06/06 14:20:05  jgrosseo
82 o) updated test preprocessor (alberto)
83 o) added comments to example macro
84 o) test shuttle implements new interface
85
86 Revision 1.2  2006/03/07 07:52:34  hristov
87 New version (B.Yordanov)
88
89 Revision 1.3  2005/11/17 17:47:34  byordano
90 TList changed to TObjArray
91
92 Revision 1.2  2005/11/17 14:43:22  byordano
93 import to local CVS
94
95 Revision 1.1.1.1  2005/10/28 07:33:58  hristov
96 Initial import as subdirectory in AliRoot
97
98 Revision 1.1.1.1  2005/09/12 22:11:40  byordano
99 SHUTTLE package
100
101 Revision 1.2  2005/08/29 21:15:47  byordano
102 some docs added
103
104 */
105
106 //
107 // test implementation of the AliShuttleInterface, to be used for local tests of preprocessors
108 //
109 // reads files from the local disk
110 // stores to local CDB
111 // logs to the screen
112 //
113
114 #include "AliTestShuttle.h"
115 #include "AliLog.h"
116
117 #include "AliCDBManager.h"
118 #include "AliCDBStorage.h"
119 #include "AliCDBMetaData.h"
120 #include "AliCDBPath.h"
121 #include "AliCDBId.h"
122 #include "AliPreprocessor.h"
123
124 #include <TMap.h>
125 #include <TList.h>
126 #include <TObjString.h>
127 #include <TSystem.h>
128 #include <TTimeStamp.h>
129
130 ClassImp(AliTestShuttle)
131
132 //______________________________________________________________________________________________
133 AliTestShuttle::AliTestShuttle(Int_t run, UInt_t startTime, UInt_t endTime) :
134   fRun(run),
135   fStartTime(startTime),
136   fEndTime(endTime),
137   fTimeCreated(startTime),
138   fDCSQueryOffset(0),
139   fInputFiles(0),
140   fRunParameters(0),
141   fRunType(),
142   fPreprocessors(0),
143   fDcsAliasMap(0),
144   fTriggerConfiguration(""),
145   fTriggerDetectorMask(""),
146   fCTPtiming("")
147 {
148   // constructor
149
150   fInputFiles = new TMap;
151   fRunParameters = new TMap;
152   fPreprocessors = new TObjArray;
153
154   fInputFiles->SetOwner(1);
155   fRunParameters->SetOwner(1);
156   fPreprocessors->SetOwner(1);
157 }
158
159 //______________________________________________________________________________________________
160 AliTestShuttle::~AliTestShuttle()
161 {
162   // destructor
163
164   delete fInputFiles;
165   fInputFiles = 0;
166
167   delete fRunParameters;
168   fRunParameters = 0;
169
170   delete fPreprocessors;
171   fPreprocessors = 0;
172
173   delete fDcsAliasMap;
174   fDcsAliasMap = 0;
175 }
176
177 //______________________________________________________________________________________________
178 Bool_t AliTestShuttle::Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData,
179                                 Int_t validityStart, Bool_t validityInfinite)
180 {
181   // Stores the CDB object
182   // This function should be called at the end of the preprocessor cycle
183   //
184   // This implementation just stores it on the local disk, the full AliShuttle
185   // puts it to the Grid FileCatalog
186
187   Int_t startRun = fRun - validityStart;
188   if(startRun < 0) {
189         AliError("First valid run happens to be less than 0! Setting it to 0...");
190         startRun=0;
191   }
192
193   Int_t endRun = -1;
194   if(validityInfinite) {
195         endRun = AliCDBRunRange::Infinity();
196   } else {
197         endRun = fRun;
198   }
199
200   AliCDBId id(path, startRun, endRun);
201
202   return AliCDBManager::Instance()->GetStorage(fgkMainCDB)->Put(object, id, metaData);
203 }
204
205 //______________________________________________________________________________________________
206 Bool_t AliTestShuttle::StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData)
207 {
208   // Stores the object as reference data
209   // This function should be called at the end of the preprocessor cycle
210   //
211   // This implementation just stores it on the local disk, the full AliShuttle
212   // puts it to the Grid FileCatalog
213
214   AliCDBId id(path, fRun, fRun);
215
216   return AliCDBManager::Instance()->GetStorage(fgkMainRefStorage)->Put(object, id, metaData);
217 }
218
219 //______________________________________________________________________________________________
220 Bool_t AliTestShuttle::StoreReferenceFile(const char* detector, const char* localFile, const char* gridFileName)
221 {
222         //
223         // Stores reference file directly (without opening it). 
224         //
225         // This implementation just stores it on the local disk, the full AliShuttle 
226         // puts it to the Grid FileCatalog
227         
228         AliCDBManager* man = AliCDBManager::Instance();
229         AliCDBStorage* sto = man->GetStorage(fgkLocalRefStorage);
230         
231         TString localBaseFolder = sto->GetBaseFolder();
232         
233         TString targetDir = GetRefFilePrefix(localBaseFolder.Data(), detector); 
234         
235         return CopyFileLocally(targetDir, localFile, gridFileName);
236 }
237
238 //______________________________________________________________________________________________
239 Bool_t AliTestShuttle::StoreRunMetadataFile(const char* localFile, const char* gridFileName)
240 {
241         //
242         // Stores Run metadata file to the Grid, in the run folder
243         //
244         // Only GRP can call this function.
245         
246         AliCDBManager* man = AliCDBManager::Instance();
247         AliCDBStorage* sto = man->GetStorage(fgkLocalRefStorage);
248         
249         TString localBaseFolder = sto->GetBaseFolder();
250         
251         // Build Run level folder
252         // folder = /alice/data/year/lhcPeriod/runNb/Raw
253         
254         TTimeStamp startTime(fStartTime);
255                 
256         TString year =  Form("%d",startTime.GetDate());
257         year = year(0,4);
258                 
259         TString lhcPeriod = GetRunParameter("LHCperiod");
260         
261         if (lhcPeriod.Length() == 0) 
262         {
263                 Log("SHUTTLE","StoreRunMetaDataFile - LHCPeriod not found in logbook!");
264                 return 0;
265         }
266         
267         // TODO: currently SHUTTLE cannot write in /alice/data/ !!!!!
268         //TString targetDir = Form("%s/GRP/RunMetadata/alice/data/%s/%s/%d/Raw", 
269         //                      localBaseFolder.Data(), year.Data(), 
270         //                      lhcPeriod.Data(), fRun);
271         
272         TString targetDir = Form("%s/GRP/RunMetadata/alice/simulation/%s/%s/%d/Raw", 
273                                 localBaseFolder.Data(), year.Data(), 
274                                 lhcPeriod.Data(), fRun);
275                                         
276         return CopyFileLocally(targetDir, localFile, gridFileName);
277 }
278
279 //______________________________________________________________________________________________
280 Bool_t AliTestShuttle::CopyFileLocally(TString& targetDir, const char* localFile, const char* gridFileName)
281 {
282         //
283         // Stores file locally. Called by StoreReferenceFile and StoreRunMetadataFile
284         //
285         
286         //try to open folder, if it does not exist
287         void* dir = gSystem->OpenDirectory(targetDir.Data());
288         if (dir == NULL) {
289                 if (gSystem->mkdir(targetDir.Data(), kTRUE)) {
290                         Log("SHUTTLE", Form("StoreFileLocally - Can't open directory <%s>", targetDir.Data()));
291                         return kFALSE;
292                 }
293
294         } else {
295                 gSystem->FreeDirectory(dir);
296         }
297
298         TString target = Form("%s/%s", targetDir.Data(), gridFileName);
299         
300         Int_t result = gSystem->GetPathInfo(localFile, 0, (Long64_t*) 0, 0, 0);
301         if (result)
302         {
303                 Log("SHUTTLE", Form("StoreFileLocally - %s does not exist", localFile));
304                 return kFALSE;
305         }
306
307         result = gSystem->CopyFile(localFile, target);
308
309         if (result == 0)
310         {
311                 Log("SHUTTLE", Form("StoreFileLocally - File %s stored locally to %s", localFile, target.Data()));
312                 return kTRUE;
313         }
314         else
315         {
316                 Log("SHUTTLE", Form("StoreFileLocally - Could not store file %s to %s!. Error code = %d", 
317                                 localFile, target.Data(), result));
318                 return kFALSE;
319         }       
320
321
322
323 }
324
325 //______________________________________________________________________________________________
326 const char* AliTestShuttle::GetRefFilePrefix(const char* base, const char* detector)
327 {
328         //
329         // Get folder name of reference files 
330         //
331
332         TString offDetStr(GetOfflineDetName(detector));
333         static TString dir;
334         if (offDetStr == "ITS" || offDetStr == "MUON" || offDetStr == "PHOS")
335         {
336                 dir.Form("%s/%s/%s", base, offDetStr.Data(), detector);
337         } else {
338                 dir.Form("%s/%s", base, offDetStr.Data());
339         }
340         
341         return dir.Data();
342 }
343
344 //______________________________________________________________________________________________
345 const char* AliTestShuttle::GetFile(Int_t system, const char* detector, const char* id, const char* source)
346 {
347   // This function retrieves a file from the given system (kDAQ, kDCS, kHLT) with the given file id
348   // and from the given source in the system.
349   // The function returnes the path to the local file.
350   //
351   // test implementation of GetFile
352   // takes files from the local disks, files are passen in a TMap in the constructor
353
354   TString key;
355   key.Form("%s-%s-%s", fkSystemNames[system], detector, id);
356   TPair* sourceListPair = dynamic_cast<TPair*> (fInputFiles->FindObject(key.Data()));
357   TMap* sourceList = 0;
358   if (sourceListPair)
359     sourceList = dynamic_cast<TMap*> (sourceListPair->Value());
360   if (!sourceList)
361   {
362     AliError(Form("Could not find any file in %s with id %s (%s)", fkSystemNames[system], id, key.Data()));
363     return 0;
364   }
365
366   TObjString* fileName = 0;
367   TPair* fileNamePair = dynamic_cast<TPair*> (sourceList->FindObject(source));
368   if (fileNamePair)
369         fileName = dynamic_cast<TObjString*> (fileNamePair->Value());
370   if (!fileName)
371   {
372     AliError(Form("Could not find files from source %s in %s with id %s",
373                         source, fkSystemNames[system], id));
374     return 0;
375   }
376
377   return fileName->GetString().Data();
378 }
379
380 //______________________________________________________________________________________________
381 TList* AliTestShuttle::GetFileSources(Int_t system, const char* detector, const char* id)
382 {
383   // Returns a list of sources in a given system that saved a file with the given id
384   //
385   // test implementation of GetFileSources
386   // takes files from the local disks, files are passen in a TMap in the constructor
387
388   TString key;
389   if (id)
390     key.Form("%s-%s-%s", fkSystemNames[system], detector, id);
391   else
392     key.Form("%s-%s", fkSystemNames[system], detector);
393   
394   TList* list = new TList;
395   
396   TIterator* iter = fInputFiles->MakeIterator();
397   TObject* obj = 0;
398   while ((obj = iter->Next()))
399   {
400         TObjString* objStr = dynamic_cast<TObjString*> (obj);
401         if (objStr)
402         {
403                 Bool_t found = kFALSE;
404                 if (id)
405                 {
406                         found = (objStr->String().CompareTo(key) == 0);
407                 }
408                 else
409                         found = objStr->String().BeginsWith(key);
410                 
411                 if (found)
412                 {
413                         TPair* sourceListPair = dynamic_cast<TPair*> (fInputFiles->FindObject(objStr->String().Data()));
414                         TMap* sourceList = dynamic_cast<TMap*> (sourceListPair->Value());
415         
416                         TIterator* iter2 = sourceList->GetTable()->MakeIterator();
417                         TObject* obj2 = 0;
418                         while ((obj2 = iter2->Next()))
419                         {
420                                 TPair* pair = dynamic_cast<TPair*> (obj2);
421                                 if (pair)
422                                 {
423                                         if (!list->FindObject(pair->Key()))
424                                                 list->Add(new TObjString(pair->Key()->GetName()));
425                                 }
426                         }
427                         
428                         delete iter2;
429                 }
430         }
431   }
432   
433   if (list->GetEntries() == 0)
434     AliInfo(Form("Could not find any file in %s with id %s (%s)", fkSystemNames[system], id, key.Data()));
435   
436   return list;
437 }
438
439 //______________________________________________________________________________________________
440 TList* AliTestShuttle::GetFileIDs(Int_t system, const char* detector, const char* source)
441 {
442   // Returns a list of ids in a given system that saved a file with the given source
443   //
444   // test implementation of GetFileSources
445   // takes files from the local disks, files are passen in a TMap in the constructor
446
447
448   TString key;
449   key.Form("%s-%s", fkSystemNames[system], detector);
450   
451   TList* list = new TList;
452   
453   TIterator* iter = fInputFiles->MakeIterator();
454   TObject* obj = 0;
455   while ((obj = iter->Next()))
456   {
457         TObjString* objStr = dynamic_cast<TObjString*> (obj);
458         if (objStr)
459         {
460                 if (objStr->String().BeginsWith(key))
461                 {
462                         Bool_t found = kFALSE;
463                 
464                         TPair* sourceListPair = dynamic_cast<TPair*> (fInputFiles->FindObject(objStr->String().Data()));
465                         TMap* sourceList = dynamic_cast<TMap*> (sourceListPair->Value());
466         
467                         TIterator* iter2 = sourceList->GetTable()->MakeIterator();
468                         TObject* obj2 = 0;
469                         while ((obj2 = iter2->Next()))
470                         {
471                                 TPair* pair = dynamic_cast<TPair*> (obj2);
472                                 if (pair)
473                                 {
474                                         if (strcmp(pair->Key()->GetName(), source) == 0)
475                                                 found = kTRUE;
476                                 }
477                         }
478                         
479                         delete iter2;
480                         
481                         if (found)
482                         {
483                                 TObjArray* tokens = objStr->String().Tokenize("-");
484                                 if (tokens->GetEntries() == 3)
485                                 {
486                                         TObjString* id = dynamic_cast<TObjString*> (tokens->At(2));
487                                         if (id && !list->FindObject(id->String()))
488                                                 list->Add(new TObjString(id->String()));
489                                 }
490                                 
491                                 delete tokens;
492         
493                         }
494                 }
495         }
496   }
497   
498   if (list->GetEntries() == 0)
499     AliInfo(Form("Could not find any file in %s with source %s (%s)", fkSystemNames[system], source, key.Data()));
500   
501   return list;
502 }
503
504 //______________________________________________________________________________________________
505 void AliTestShuttle::Log(const char* detector, const char* message, UInt_t level)
506 {
507   // test implementation of Log
508   // just prints to the screen
509
510   TString fullMessage = detector;
511   fullMessage.Append(Form(": %s",message));
512   AliLog::Message(level, fullMessage, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__);
513 }
514
515 //______________________________________________________________________________________________
516 void AliTestShuttle::AddInputFile(Int_t system, const char* detector, const char* id, const char* source, const char* fileName)
517 {
518   //
519   // This function adds a file to the list of input files
520   // the list is stored in fInputFiles 
521   // fInputFiles: TMap (key -> value)
522   //    <system>-<detector>-<id> -> TMap (key -> value)
523   //                                <source> -> <filename>
524   //  
525   
526   TString key;
527   key.Form("%s-%s-%s", fkSystemNames[system], detector, id);
528   TPair* sourceListPair = dynamic_cast<TPair*> (fInputFiles->FindObject(key.Data()));
529   TMap* sourceList = 0;
530   if (sourceListPair)
531     sourceList = dynamic_cast<TMap*> (sourceListPair->Value());
532   if (!sourceList)
533   {
534     sourceList = new TMap;
535     fInputFiles->Add(new TObjString(key), sourceList);
536   }
537
538   sourceList->Add(new TObjString(source), new TObjString(fileName));
539 }
540
541 //______________________________________________________________________________________________
542 Bool_t AliTestShuttle::AddInputCDBEntry(AliCDBEntry* entry)
543 {
544   // This function adds an object in the OCDB to be later retrieved with GetFromOCDB
545
546         AliCDBStorage *sto = AliCDBManager::Instance()->GetStorage(fgkMainCDB);
547         if (!sto)
548         {
549                 Log("SHUTTLE", "GetFromOCDB - Cannot activate main OCDB for query!");
550                 return 0;
551         }
552
553         return sto->Put(entry);
554 }
555
556 //______________________________________________________________________________________________
557 AliCDBEntry* AliTestShuttle::GetFromOCDB(const char* detector, const AliCDBPath& path)
558 {
559 // returns obiect from OCDB valid for current run
560
561         AliCDBStorage *sto = AliCDBManager::Instance()->GetStorage(fgkMainCDB);
562         if (!sto)
563         {
564                 Log("SHUTTLE", "GetFromOCDB - Cannot activate main OCDB for query!");
565                 return 0;
566         }
567
568         return (AliCDBEntry*) sto->Get(path, fRun);
569 }
570
571 //______________________________________________________________________________________________
572 void AliTestShuttle::Process()
573 {
574   // This function tests all preprocessors that are registered to it
575   // All preprocessors get the same dcs alias map and have access to the same list of files.
576
577   for (Int_t i=0; i<fPreprocessors->GetEntries(); ++i)
578   {
579     AliPreprocessor* preprocessor = dynamic_cast<AliPreprocessor*> (fPreprocessors->At(i));
580     if (preprocessor)
581     {
582       if (preprocessor->ProcessRunType())
583               {
584                       preprocessor->Initialize(fRun, fStartTime, fEndTime);
585                       preprocessor->Process(fDcsAliasMap);
586               }
587       
588     }
589   }
590 }
591
592 //______________________________________________________________________________________________
593 void AliTestShuttle::RegisterPreprocessor(AliPreprocessor* preprocessor)
594 {
595   // registers a preprocessor
596
597         const char* detName = preprocessor->GetName();
598         if(strcmp("DET", detName) != 0) {
599                 if(GetDetPos(detName) < 0)
600                         AliFatal(Form("********** !!!!! Invalid detector name: %s !!!!! **********", detName));
601         }
602
603         fPreprocessors->Add(preprocessor);
604 }
605
606 //______________________________________________________________________________________________
607 void AliTestShuttle::AddInputRunParameter(const char* key, const char* value){
608 // set a run parameter (in reality it will be read from the DAQ logbook)
609
610         TObjString* keyObj = new TObjString(key);
611         if (fRunParameters->Contains(key)) {
612                 AliWarning(Form("Parameter %s already existing and it will be replaced.", key));
613                 delete fRunParameters->Remove(keyObj);
614
615         }
616         fRunParameters->Add(keyObj, new TObjString(value));
617         AliDebug(2, Form("Number of parameters: %d", fRunParameters->
618         GetEntries()));
619 }
620
621 //______________________________________________________________________________________________
622 const char* AliTestShuttle::GetRunType()
623 {
624         //
625         // get a run parameter
626         //
627
628         return fRunType.Data();
629 }
630
631 //______________________________________________________________________________________________
632 const char* AliTestShuttle::GetRunParameter(const char* key){
633 // get a run parameter
634
635         TObjString* value = dynamic_cast<TObjString*> (fRunParameters->GetValue(key));
636         if(!value) {
637                 AliError(Form("No such parameter: %s", key));
638                 return 0;
639         }
640         return value->GetName();
641 }
642
643 //______________________________________________________________________________________________
644 void AliTestShuttle::SetShuttleTempDir(const char* tmpDir)
645 {
646 // sets Shuttle temp directory
647
648         fgkShuttleTempDir = gSystem->ExpandPathName(tmpDir);
649 }
650
651 //______________________________________________________________________________________________
652 void AliTestShuttle::SetShuttleLogDir(const char* logDir)
653 {
654 // sets Shuttle log directory
655
656         fgkShuttleLogDir = gSystem->ExpandPathName(logDir);
657 }
658
659 //______________________________________________________________________________________________
660 const char* AliTestShuttle::GetTriggerConfiguration()
661 {
662         //returns trigger configuration
663         if (fTriggerConfiguration.Length()>0){
664                 return fTriggerConfiguration;
665         }
666         return NULL;
667 }
668 //______________________________________________________________________________________________
669 const char* AliTestShuttle::GetCTPTimeParams()
670 {
671         //returns trigger configuration
672         if (fCTPtiming.Length()>0){
673                 return fCTPtiming;
674         }
675         return NULL;
676 }
677 //______________________________________________________________________________________________
678 const char* AliTestShuttle::GetTriggerDetectorMask()
679 {
680         //returns trigger detector mask
681         if (fTriggerDetectorMask.Length()>0){
682                 return fTriggerDetectorMask;
683         }
684         return NULL;
685 }
686 //______________________________________________________________________________________________
687 UInt_t AliTestShuttle::GetStartTimeDCSQuery()
688 {
689         // Return Start Time for the DCS query
690         //
691         // The call is delegated to AliShuttleInterface
692
693         return fTimeCreated-fDCSQueryOffset;
694 }
695 //______________________________________________________________________________________________
696 UInt_t AliTestShuttle::GetEndTimeDCSQuery()
697 {
698         // Return End Time for the DCS query
699         //
700         // The call is delegated to AliShuttleInterface
701
702         return fEndTime+fDCSQueryOffset;
703 }