1 |
kusanagi |
1.1 |
/************************************************************** |
2 |
|
|
* |
3 |
|
|
*****************CONFIGURATION ZONE**************************** |
4 |
|
|
* |
5 |
|
|
**************************************************************/ |
6 |
|
|
#include <TList.h> |
7 |
|
|
#include <TTree.h> |
8 |
|
|
#include <TChain.h> |
9 |
|
|
#include <TH1.h> |
10 |
|
|
#include <TSystemDirectory.h> |
11 |
|
|
#include <TFile.h> |
12 |
|
|
#include <TString.h> |
13 |
|
|
#include <Rtypes.h> |
14 |
|
|
#include <iostream> |
15 |
|
|
|
16 |
|
|
|
17 |
|
|
class Utility { |
18 |
|
|
public: |
19 |
|
|
/* |
20 |
|
|
static const char *scriptRepository = "/home/pamela_yoda/scriptdef/"; |
21 |
|
|
//static const char *libYoda = "/opt/yoda/lib/libyoda.so"; |
22 |
|
|
static const char *LogTemplate = "/home/pamela_yoda/scriptdef/FilesUtility/LogTemplate.xsl"; |
23 |
|
|
static const char *VarDumpTemplate = "/home/pamela_yoda/scriptdef/FilesUtility/VarDumpTemplate.xsl"; |
24 |
|
|
static const char *ArrDumpTemplate = "/home/pamela_yoda/scriptdef/FilesUtility/ArrDumpTemplate.xsl"; |
25 |
|
|
static const char *RunHeaderTemplate = "/home/pamela_yoda/scriptdef/FilesUtility/RunHeaderTemplate.xsl"; |
26 |
|
|
static const char *PhysEndRunTemplate = "/home/pamela_yoda/scriptdef/FilesUtility/PhysEndRunTemplate.xsl"; |
27 |
|
|
static const char *McmdTemplate = "/home/pamela_yoda/scriptdef/FilesUtility/McmdTemplate.xsl"; |
28 |
|
|
*/ |
29 |
|
|
|
30 |
|
|
static void digForFiles(TList& out, TSystemDirectory *tsd, std::string defin); |
31 |
|
|
static void makeAllFriend(TTree& out, TList* input); |
32 |
|
|
static void makeAllChained(TChain& out, TList* input); |
33 |
|
|
static TFile* getFile(TString base, TString packetType, TString subType); |
34 |
|
|
static Int_t getLastNotZeroBin(TH1 *histo); |
35 |
|
|
static Int_t getFirstNotZeroBin(TH1 *histo); |
36 |
kusanagi |
1.2 |
static void endian_swap(UShort_t& x); |
37 |
|
|
static void endian_swap(UInt_t& x); |
38 |
|
|
|
39 |
|
|
/* |
40 |
|
|
inline void endian_swap(ULong64_t& x){ |
41 |
|
|
x = (x>>56) | |
42 |
|
|
((x<<40) & 0x00FF000000000000) | |
43 |
|
|
((x<<24) & 0x0000FF0000000000) | |
44 |
|
|
((x<<8) & 0x000000FF00000000) | |
45 |
|
|
((x>>8) & 0x00000000FF000000) | |
46 |
|
|
((x>>24) & 0x0000000000FF0000) | |
47 |
|
|
((x>>40) & 0x000000000000FF00) | |
48 |
|
|
(x<<56); |
49 |
|
|
} |
50 |
|
|
*/ |
51 |
kusanagi |
1.1 |
}; |
52 |
|
|
|
53 |
|
|
|