]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muondep/AliMuonAccEffSubmitter.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWG / muondep / AliMuonAccEffSubmitter.h
1 #ifndef ALIMUONACCEFFSUBMITTER_H
2 #define ALIMUONACCEFFSUBMITTER_H
3
4 //
5 // AliMuonAccEffSubmitter : a class to help submit Acc x Eff simulations
6 // anchored to real runs for J/psi, upsilon, single muons, etc...
7 //
8 // author: Laurent Aphecetche (Subatech)
9 //
10
11 #include "AliMuonGridSubmitter.h"
12
13 class AliMuonAccEffSubmitter : public AliMuonGridSubmitter
14 {
15 public:
16   AliMuonAccEffSubmitter(const char* generator="GenParamCustom", Bool_t localOnly=kFALSE);
17
18   virtual Bool_t Generate(const char* jdlname) const;
19   virtual Bool_t Run(const char* mode);
20
21   virtual ~AliMuonAccEffSubmitter();
22
23   void MakeNofEventsPropToTriggerCount(const char* trigger="CMUL7-B-NOPF-MUON", Float_t ratio=1.0);
24   
25   void MakeNofEventsFixed(Int_t nevents);
26   
27   void UseOCDBSnapshots(Bool_t flag);
28   
29   void UseExternalConfig(const char* externalConfigFullFilePath);
30   
31   void UseAODMerging(Bool_t flag);
32   
33   Bool_t Merge(Int_t stage, Bool_t dryRun=kTRUE);
34
35   Int_t Submit(Bool_t dryRun=kTRUE);
36   
37   Int_t LocalTest();
38   
39   TString RunJDLName() const { return "run.jdl"; }
40
41   TString MergeJDLName(Bool_t final) const { return (final ? "AOD_merge_final.jdl" : "AOD_merge.jdl"); }
42
43   virtual void Print(Option_t* opt="") const;
44
45   void SetSplitMaxInputFileNumber(Int_t n) { fSplitMaxInputFileNumber = n; }
46   
47   Int_t GetSplitMaxInputFileNumber() const { return fSplitMaxInputFileNumber; }
48   
49   Int_t CompactMode() const { return fCompactMode; }
50   
51   void SetCompactMode(Int_t mode) { fCompactMode=mode; }
52   
53   Bool_t MakeOCDBSnapshots();
54   
55   void SetOCDBPath(const char* ocdbPath);
56
57   void SetOCDBSnapshotDir(const char* dir);
58
59   Bool_t SetGenerator(const char* generator);
60
61   void CleanLocal(const char* excludeList="OCDB_") const;
62   
63   Int_t MaxEventsPerChunk() const { return fMaxEventsPerChunk; }
64   void SetMaxEventsPerChunk(Int_t n) { fMaxEventsPerChunk = n; }
65
66   TString OCDBPath() const { return GetMapValue("OCDBPath"); }
67   
68   TString SnapshotDir() const { return GetMapValue("OCDBsnapshot"); }
69
70 private:
71   
72   Bool_t GenerateRunJDL(const char* name) const;
73   
74   Bool_t GenerateMergeJDL(const char* name) const;
75   
76   TString ReferenceTrigger() const { return GetMapValue("ReferenceTrigger"); }
77   
78   void UpdateLocalFileList(Bool_t clearSnapshots=kFALSE);
79
80 private:
81   AliMuonAccEffSubmitter(const AliMuonAccEffSubmitter& rhs);
82   AliMuonAccEffSubmitter& operator=(const AliMuonAccEffSubmitter& rhs);
83   
84 private:
85   Float_t fRatio; // ratio simulated events vs real events
86   Int_t fFixedNofEvents; // fixed number of events to be used per run
87   Int_t fMaxEventsPerChunk; // max events to generate per subjob
88   TString fOCDBPath; // OCDB path
89   Int_t fSplitMaxInputFileNumber; // used for merging jdl
90   Int_t fCompactMode; // controls which outputs are kept (0=everything, 1=only aods)
91   TString fExternalConfig; // path to an (optional) external config file
92   Bool_t fUseOCDBSnapshots; // whether to use OCDB snapshots or not
93   TString fSnapshotDir; // directory for OCDB snapshots
94   Bool_t fUseAODMerging; // whether or not to perform (aod) merging
95   
96   ClassDef(AliMuonAccEffSubmitter,2) // Helper class to submit AccxEff single particle simulations
97 };
98
99 #endif
100