]> git.uio.no Git - u/mrichter/AliRoot.git/blame - SHUTTLE/TestShuttle/AliTestShuttle.cxx
Adding functionality to retrieve logbook_trigger_config.alignmentFile from
[u/mrichter/AliRoot.git] / SHUTTLE / TestShuttle / AliTestShuttle.cxx
CommitLineData
5c6b40ae 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$
77dc0223 18Revision 1.14 2007/08/06 12:25:47 acolla
19Function Bool_t GetHLTStatus added to preprocessor. It returns the status of HLT
20read from the run logbook.
21TestShuttle setup updated.
22TRD data point configuration updated.
23
87968cd5 24Revision 1.13 2007/05/30 06:35:21 jgrosseo
25Adding functionality to the Shuttle/TestShuttle:
26o) Function to retrieve list of sources from a given system (GetFileSources with id=0)
27o) Function to retrieve list of IDs for a given source (GetFileIDs)
28These functions are needed for dealing with the tag files that are saved for the GRP preprocessor
29Example code has been added to the TestProcessor in TestShuttle
30
4a33bdd9 31Revision 1.12 2007/04/27 07:06:48 jgrosseo
32GetFileSources returns empty list in case of no files, but successful query
33No mails sent in testmode
34
86aa42c3 35Revision 1.11 2007/04/04 10:33:36 jgrosseo
361) 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.
37In case of an error with the Grid, the Shuttle will retry the storing later, the preprocessor does not need to be run again.
38
392) 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
413) New function StoreReferenceFile to _directly_ store a file (without opening it) to the reference storage.
42
434) The memory usage of the preprocessor is monitored. If it exceeds 2 GB it is terminated.
44
455) 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.
46If you always need DCS data (like before), you do not need to implement it.
47
486) The run type has been added to the monitoring page
49
9827400b 50Revision 1.10 2007/02/28 10:41:01 acolla
51Run type field added in SHUTTLE framework. Run type is read from "run type" logbook and retrieved by
52AliPreprocessor::GetRunType() function.
53Added some ldap definition files.
54
d461a8a7 55Revision 1.8 2007/02/13 11:22:25 acolla
56Shuttle getters and setters of main/local OCDB/Reference storages, temp and log
57folders moved to AliShuttleInterface
58
e19c88ea 59Revision 1.6 2006/11/06 14:22:47 jgrosseo
60major update (Alberto)
61o) reading of run parameters from the logbook
62o) online offline naming conversion
63o) standalone DCSclient package
64
eba76848 65Revision 1.5 2006/10/02 12:58:52 jgrosseo
66Small interface change in StoreReferenceData
67
8c77aee7 68Revision 1.4 2006/08/08 14:19:07 jgrosseo
69Update to shuttle classes (Alberto)
70
71- Possibility to set the full object's path in the Preprocessor's and
72Shuttle'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
76data in a dedicated CDB storage.
77
84090f85 78Revision 1.3 2006/07/11 12:44:32 jgrosseo
79adding parameters for extended validity range of data produced by preprocessor
80
17111222 81Revision 1.2 2006/06/06 14:20:05 jgrosseo
82o) updated test preprocessor (alberto)
83o) added comments to example macro
84o) test shuttle implements new interface
85
5c6b40ae 86Revision 1.2 2006/03/07 07:52:34 hristov
87New version (B.Yordanov)
88
89Revision 1.3 2005/11/17 17:47:34 byordano
90TList changed to TObjArray
91
92Revision 1.2 2005/11/17 14:43:22 byordano
93import to local CVS
94
95Revision 1.1.1.1 2005/10/28 07:33:58 hristov
96Initial import as subdirectory in AliRoot
97
98Revision 1.1.1.1 2005/09/12 22:11:40 byordano
99SHUTTLE package
100
101Revision 1.2 2005/08/29 21:15:47 byordano
102some 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"
84090f85 118#include "AliCDBStorage.h"
5c6b40ae 119#include "AliCDBMetaData.h"
84090f85 120#include "AliCDBPath.h"
5c6b40ae 121#include "AliCDBId.h"
36137ac1 122#include "AliPreprocessor.h"
5c6b40ae 123
124#include <TMap.h>
125#include <TList.h>
5c6b40ae 126#include <TObjString.h>
e19c88ea 127#include <TSystem.h>
77dc0223 128#include <TTimeStamp.h>
5c6b40ae 129
130ClassImp(AliTestShuttle)
131
36137ac1 132//______________________________________________________________________________________________
17111222 133AliTestShuttle::AliTestShuttle(Int_t run, UInt_t startTime, UInt_t endTime) :
134 fRun(run),
135 fStartTime(startTime),
136 fEndTime(endTime),
eff647d5 137 fTimeCreated(startTime),
138 fDCSQueryOffset(0),
36137ac1 139 fInputFiles(0),
eba76848 140 fRunParameters(0),
9827400b 141 fRunType(),
36137ac1 142 fPreprocessors(0),
2c5f9d06 143 fDcsAliasMap(0),
144 fTriggerConfiguration(""),
145 fTriggerDetectorMask(""),
146 fCTPtiming("")
5c6b40ae 147{
148 // constructor
36137ac1 149
150 fInputFiles = new TMap;
eba76848 151 fRunParameters = new TMap;
36137ac1 152 fPreprocessors = new TObjArray;
441b0e9c 153
154 fInputFiles->SetOwner(1);
155 fRunParameters->SetOwner(1);
441b0e9c 156 fPreprocessors->SetOwner(1);
5c6b40ae 157}
158
36137ac1 159//______________________________________________________________________________________________
5c6b40ae 160AliTestShuttle::~AliTestShuttle()
161{
162 // destructor
36137ac1 163
164 delete fInputFiles;
165 fInputFiles = 0;
166
eba76848 167 delete fRunParameters;
168 fRunParameters = 0;
169
36137ac1 170 delete fPreprocessors;
171 fPreprocessors = 0;
172
173 delete fDcsAliasMap;
174 fDcsAliasMap = 0;
5c6b40ae 175}
176
36137ac1 177//______________________________________________________________________________________________
9827400b 178Bool_t AliTestShuttle::Store(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData,
84090f85 179 Int_t validityStart, Bool_t validityInfinite)
5c6b40ae 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
84090f85 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 }
17111222 192
84090f85 193 Int_t endRun = -1;
194 if(validityInfinite) {
195 endRun = AliCDBRunRange::Infinity();
196 } else {
197 endRun = fRun;
198 }
17111222 199
84090f85 200 AliCDBId id(path, startRun, endRun);
17111222 201
e19c88ea 202 return AliCDBManager::Instance()->GetStorage(fgkMainCDB)->Put(object, id, metaData);
84090f85 203}
17111222 204
84090f85 205//______________________________________________________________________________________________
9827400b 206Bool_t AliTestShuttle::StoreReferenceData(const AliCDBPath& path, TObject* object, AliCDBMetaData* metaData)
84090f85 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
8c77aee7 214 AliCDBId id(path, fRun, fRun);
84090f85 215
e19c88ea 216 return AliCDBManager::Instance()->GetStorage(fgkMainRefStorage)->Put(object, id, metaData);
5c6b40ae 217}
218
9827400b 219//______________________________________________________________________________________________
220Bool_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();
77dc0223 229 AliCDBStorage* sto = man->GetStorage(fgkLocalRefStorage);
9827400b 230
231 TString localBaseFolder = sto->GetBaseFolder();
232
77dc0223 233 TString targetDir = GetRefFilePrefix(localBaseFolder.Data(), detector);
9827400b 234
77dc0223 235 return CopyFileLocally(targetDir, localFile, gridFileName);
236}
237
238//______________________________________________________________________________________________
239Bool_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.
9827400b 245
77dc0223 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)
9827400b 262 {
77dc0223 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//______________________________________________________________________________________________
280Bool_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()));
9827400b 291 return kFALSE;
292 }
77dc0223 293
294 } else {
295 gSystem->FreeDirectory(dir);
9827400b 296 }
77dc0223 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
9827400b 307 result = gSystem->CopyFile(localFile, target);
308
309 if (result == 0)
310 {
77dc0223 311 Log("SHUTTLE", Form("StoreFileLocally - File %s stored locally to %s", localFile, target.Data()));
9827400b 312 return kTRUE;
313 }
314 else
315 {
77dc0223 316 Log("SHUTTLE", Form("StoreFileLocally - Could not store file %s to %s!. Error code = %d",
317 localFile, target.Data(), result));
9827400b 318 return kFALSE;
77dc0223 319 }
320
321
322
323}
324
325//______________________________________________________________________________________________
326const 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));
0ffe41b3 333 static TString dir;
77dc0223 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();
9827400b 342}
343
36137ac1 344//______________________________________________________________________________________________
5c6b40ae 345const 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
4a33bdd9 366 TObjString* fileName = 0;
5c6b40ae 367 TPair* fileNamePair = dynamic_cast<TPair*> (sourceList->FindObject(source));
4a33bdd9 368 if (fileNamePair)
369 fileName = dynamic_cast<TObjString*> (fileNamePair->Value());
5c6b40ae 370 if (!fileName)
371 {
36137ac1 372 AliError(Form("Could not find files from source %s in %s with id %s",
373 source, fkSystemNames[system], id));
5c6b40ae 374 return 0;
375 }
376
377 return fileName->GetString().Data();
378}
379
36137ac1 380//______________________________________________________________________________________________
5c6b40ae 381TList* 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;
4a33bdd9 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()))
5c6b40ae 399 {
4a33bdd9 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 }
5c6b40ae 431 }
4a33bdd9 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}
5c6b40ae 438
4a33bdd9 439//______________________________________________________________________________________________
440TList* 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
5c6b40ae 451 TList* list = new TList;
4a33bdd9 452
453 TIterator* iter = fInputFiles->MakeIterator();
454 TObject* obj = 0;
5c6b40ae 455 while ((obj = iter->Next()))
456 {
4a33bdd9 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 }
5c6b40ae 496 }
4a33bdd9 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
5c6b40ae 501 return list;
502}
503
36137ac1 504//______________________________________________________________________________________________
5c6b40ae 505void AliTestShuttle::Log(const char* detector, const char* message)
506{
507 // test implementation of Log
508 // just prints to the screen
509
510 AliInfo(Form("%s: %s", detector, message));
511}
512
36137ac1 513//______________________________________________________________________________________________
514void AliTestShuttle::AddInputFile(Int_t system, const char* detector, const char* id, const char* source, const char* fileName)
515{
4a33bdd9 516 //
36137ac1 517 // This function adds a file to the list of input files
4a33bdd9 518 // the list is stored in fInputFiles
519 // fInputFiles: TMap (key -> value)
520 // <system>-<detector>-<id> -> TMap (key -> value)
521 // <source> -> <filename>
522 //
523
36137ac1 524 TString key;
525 key.Form("%s-%s-%s", fkSystemNames[system], detector, id);
526 TPair* sourceListPair = dynamic_cast<TPair*> (fInputFiles->FindObject(key.Data()));
527 TMap* sourceList = 0;
528 if (sourceListPair)
529 sourceList = dynamic_cast<TMap*> (sourceListPair->Value());
530 if (!sourceList)
531 {
532 sourceList = new TMap;
533 fInputFiles->Add(new TObjString(key), sourceList);
534 }
535
536 sourceList->Add(new TObjString(source), new TObjString(fileName));
537}
538
d461a8a7 539//______________________________________________________________________________________________
540Bool_t AliTestShuttle::AddInputCDBEntry(AliCDBEntry* entry)
541{
542 // This function adds an object in the OCDB to be later retrieved with GetFromOCDB
543
544 AliCDBStorage *sto = AliCDBManager::Instance()->GetStorage(fgkMainCDB);
545 if (!sto)
546 {
547 Log("SHUTTLE", "GetFromOCDB - Cannot activate main OCDB for query!");
548 return 0;
549 }
550
551 return sto->Put(entry);
552}
553
554//______________________________________________________________________________________________
9827400b 555AliCDBEntry* AliTestShuttle::GetFromOCDB(const char* detector, const AliCDBPath& path)
d461a8a7 556{
557// returns obiect from OCDB valid for current run
558
559 AliCDBStorage *sto = AliCDBManager::Instance()->GetStorage(fgkMainCDB);
560 if (!sto)
561 {
562 Log("SHUTTLE", "GetFromOCDB - Cannot activate main OCDB for query!");
563 return 0;
564 }
565
566 return (AliCDBEntry*) sto->Get(path, fRun);
567}
568
36137ac1 569//______________________________________________________________________________________________
570void AliTestShuttle::Process()
571{
572 // This function tests all preprocessors that are registered to it
573 // All preprocessors get the same dcs alias map and have access to the same list of files.
574
575 for (Int_t i=0; i<fPreprocessors->GetEntries(); ++i)
576 {
577 AliPreprocessor* preprocessor = dynamic_cast<AliPreprocessor*> (fPreprocessors->At(i));
578 if (preprocessor)
579 {
0ffe41b3 580 if (preprocessor->ProcessRunType())
c986bd09 581 {
582 preprocessor->Initialize(fRun, fStartTime, fEndTime);
583 preprocessor->Process(fDcsAliasMap);
584 }
585
36137ac1 586 }
587 }
588}
589
590//______________________________________________________________________________________________
591void AliTestShuttle::RegisterPreprocessor(AliPreprocessor* preprocessor)
592{
593 // registers a preprocessor
594
eba76848 595 const char* detName = preprocessor->GetName();
596 if(strcmp("DET", detName) != 0) {
597 if(GetDetPos(detName) < 0)
598 AliFatal(Form("********** !!!!! Invalid detector name: %s !!!!! **********", detName));
441b0e9c 599 }
eba76848 600
601 fPreprocessors->Add(preprocessor);
602}
603
604//______________________________________________________________________________________________
605void AliTestShuttle::AddInputRunParameter(const char* key, const char* value){
606// set a run parameter (in reality it will be read from the DAQ logbook)
607
608 TObjString* keyObj = new TObjString(key);
609 if (fRunParameters->Contains(key)) {
610 AliWarning(Form("Parameter %s already existing and it will be replaced.", key));
611 delete fRunParameters->Remove(keyObj);
612
613 }
614 fRunParameters->Add(keyObj, new TObjString(value));
615 AliDebug(2, Form("Number of parameters: %d", fRunParameters->
616 GetEntries()));
617}
618
441b0e9c 619//______________________________________________________________________________________________
9827400b 620const char* AliTestShuttle::GetRunType()
621{
622 //
623 // get a run parameter
624 //
441b0e9c 625
87968cd5 626 return fRunType.Data();
441b0e9c 627}
628
eba76848 629//______________________________________________________________________________________________
630const char* AliTestShuttle::GetRunParameter(const char* key){
631// get a run parameter
632
633 TObjString* value = dynamic_cast<TObjString*> (fRunParameters->GetValue(key));
634 if(!value) {
635 AliError(Form("No such parameter: %s", key));
636 return 0;
637 }
638 return value->GetName();
36137ac1 639}
e19c88ea 640
d461a8a7 641//______________________________________________________________________________________________
642void AliTestShuttle::SetShuttleTempDir(const char* tmpDir)
643{
644// sets Shuttle temp directory
645
646 fgkShuttleTempDir = gSystem->ExpandPathName(tmpDir);
647}
648
649//______________________________________________________________________________________________
650void AliTestShuttle::SetShuttleLogDir(const char* logDir)
651{
652// sets Shuttle log directory
653
654 fgkShuttleLogDir = gSystem->ExpandPathName(logDir);
655}
656
59def2a2 657//______________________________________________________________________________________________
658const char* AliTestShuttle::GetTriggerConfiguration()
659{
660 //returns trigger configuration
661 if (fTriggerConfiguration.Length()>0){
662 return fTriggerConfiguration;
663 }
664 return NULL;
665}
eff647d5 666//______________________________________________________________________________________________
2c5f9d06 667const char* AliTestShuttle::GetCTPTimeParams()
668{
669 //returns trigger configuration
670 if (fCTPtiming.Length()>0){
671 return fCTPtiming;
672 }
673 return NULL;
674}
675//______________________________________________________________________________________________
c986bd09 676const char* AliTestShuttle::GetTriggerDetectorMask()
677{
678 //returns trigger detector mask
679 if (fTriggerDetectorMask.Length()>0){
680 return fTriggerDetectorMask;
681 }
682 return NULL;
683}
684//______________________________________________________________________________________________
09324cf1 685UInt_t AliTestShuttle::GetStartTimeDCSQuery()
eff647d5 686{
687 // Return Start Time for the DCS query
688 //
689 // The call is delegated to AliShuttleInterface
690
691 return fTimeCreated-fDCSQueryOffset;
692}
693//______________________________________________________________________________________________
09324cf1 694UInt_t AliTestShuttle::GetEndTimeDCSQuery()
eff647d5 695{
696 // Return End Time for the DCS query
697 //
698 // The call is delegated to AliShuttleInterface
699
700 return fEndTime+fDCSQueryOffset;
701}