1 |
mocchiut |
1.1 |
#ifndef runglue_h |
2 |
|
|
#define runglue_h |
3 |
|
|
// |
4 |
mocchiut |
1.4 |
#include <sstream> |
5 |
|
|
#include <iostream> |
6 |
|
|
#include <TFile.h> |
7 |
|
|
#include <TTree.h> |
8 |
|
|
#include <TTimeStamp.h> |
9 |
|
|
#include <TTreeCloner.h> |
10 |
mocchiut |
1.1 |
#include <TSQLServer.h> |
11 |
|
|
#include <TSQLRow.h> |
12 |
|
|
#include <TSQLResult.h> |
13 |
|
|
#include <TList.h> |
14 |
|
|
#include <TString.h> |
15 |
|
|
#include <TObject.h> |
16 |
|
|
#include <TSQLServer.h> |
17 |
|
|
#include <TSQLRow.h> |
18 |
|
|
#include <TSQLResult.h> |
19 |
|
|
#include <TString.h> |
20 |
|
|
#include <TTimeStamp.h> |
21 |
|
|
#include <TSQLServer.h> |
22 |
mocchiut |
1.4 |
#include <TRFIOFile.h> |
23 |
mocchiut |
1.1 |
#include <TSystem.h> |
24 |
|
|
#include <TChain.h> |
25 |
|
|
#include <TH1.h> |
26 |
|
|
#include <TTree.h> |
27 |
|
|
#include <TKey.h> |
28 |
|
|
#include <Riostream.h> |
29 |
|
|
#include <TObjString.h> |
30 |
|
|
#include <TClass.h> |
31 |
|
|
#include <PamLevel2.h> |
32 |
|
|
// |
33 |
|
|
/** |
34 |
|
|
* \brief Class to group runs day by day |
35 |
|
|
*/ |
36 |
|
|
class RunGlue : public TObject { |
37 |
|
|
private: |
38 |
|
|
TSQLServer *dbc; |
39 |
|
|
PamLevel2 *li; |
40 |
|
|
UInt_t run; |
41 |
|
|
TString dir; |
42 |
|
|
TString outdir; |
43 |
|
|
TString fFilename; |
44 |
|
|
Bool_t fEnd; |
45 |
|
|
Bool_t RUN; |
46 |
|
|
TList *fDoneList; |
47 |
|
|
TList *fList; |
48 |
|
|
TList *lList; |
49 |
mocchiut |
1.4 |
// TFile *Target; |
50 |
|
|
TRFIOFile *Target; |
51 |
mocchiut |
1.1 |
TFile *Source; |
52 |
|
|
TString fDList; |
53 |
|
|
Bool_t fastMethod; |
54 |
|
|
Bool_t fDBG; |
55 |
mocchiut |
1.2 |
Bool_t fOpen; |
56 |
mocchiut |
1.4 |
Bool_t castor; |
57 |
mocchiut |
1.1 |
Bool_t runmode; |
58 |
|
|
Bool_t createlist; |
59 |
|
|
Bool_t merged; |
60 |
|
|
UInt_t fNlist; |
61 |
|
|
UInt_t fNlistdone; |
62 |
|
|
UInt_t nrun; |
63 |
|
|
UInt_t YY; |
64 |
|
|
UInt_t MM; |
65 |
|
|
UInt_t DD; |
66 |
|
|
|
67 |
|
|
public: |
68 |
|
|
// |
69 |
|
|
RunGlue(); |
70 |
|
|
// |
71 |
mocchiut |
1.4 |
RunGlue(TSQLServer *dbc,UInt_t run, TString dir, TString wrkdir, Bool_t castor); |
72 |
mocchiut |
1.1 |
// |
73 |
|
|
// methods |
74 |
|
|
// |
75 |
|
|
void Clear(); |
76 |
|
|
void Clean(); |
77 |
|
|
TList *GetRunList(); |
78 |
mocchiut |
1.3 |
Long64_t Mergy(TChain *, TFile *, Int_t, Option_t *); |
79 |
mocchiut |
1.4 |
//Long64_t Mergy(TChain *, TRFIOFile *, Int_t, Option_t *); |
80 |
mocchiut |
1.1 |
void MergeRootfile(TList *); |
81 |
|
|
Bool_t OpenFile(); |
82 |
mocchiut |
1.4 |
// Bool_t OpenFile(Bool_t castor); |
83 |
mocchiut |
1.1 |
void SetDebug(Bool_t); |
84 |
|
|
void SetDList(TString); |
85 |
|
|
void DeleteRunFiles(TList *); |
86 |
|
|
void UpdateDB(TList *); |
87 |
|
|
// |
88 |
mocchiut |
1.3 |
// inline methods |
89 |
mocchiut |
1.1 |
// |
90 |
|
|
Bool_t End(){return(fEnd);}; |
91 |
mocchiut |
1.2 |
Bool_t FileIsOpen(){return(fOpen);}; |
92 |
mocchiut |
1.1 |
Bool_t DebugMode(){return(fDBG);}; |
93 |
|
|
TString GetFilename(){return(fFilename);}; |
94 |
|
|
// |
95 |
|
|
// |
96 |
|
|
// |
97 |
|
|
// |
98 |
|
|
ClassDef(RunGlue,1); |
99 |
|
|
// |
100 |
|
|
}; |
101 |
|
|
|
102 |
|
|
#endif |