Go to the source code of this file.
|
TChain * | CreateChainFromList_opt (std::string ListFileName, std::string ChainName, std::string BaseDirectory, bool DoCheck=false) |
|
void | MakeCombinedFile (std::string FileList, std::string BaseDirectory, std::string OutputName) |
|
void | AssembleSingleFile (std::string FileList, std::string BaseDirectory, std::string OutputName) |
|
void AssembleSingleFile |
( |
std::string |
FileList, |
|
|
std::string |
BaseDirectory, |
|
|
std::string |
OutputName |
|
) |
| |
Definition at line 7 of file AssembleSingleFile.C.
References CreateChainFromList_opt(), and f.
10 TFile*
f = TFile::Open(OutputName.c_str(),
"RECREATE");
12 FileList.c_str(), BaseDirectory.c_str(),
"pmtresponse/PhotonLibraryData",
false);
14 Int_t Voxel, OpChannel;
16 ch->SetBranchAddress(
"Voxel", &Voxel);
17 ch->SetBranchAddress(
"OpChannel", &OpChannel);
18 ch->SetBranchAddress(
"Visibility", &Visibility);
20 TTree*
tt =
new TTree(
"PhotonLibraryData",
"PhotonLibraryData");
21 tt->Branch(
"Voxel", &Voxel,
"Voxel/I");
22 tt->Branch(
"OpChannel", &OpChannel,
"OpChannel/I");
23 tt->Branch(
"Visibility", &Visibility,
"Visibility/F");
25 for (
int i = 0; i != ch->GetEntries(); ++i) {
TChain * CreateChainFromList_opt(std::string ListFileName, std::string ChainName, std::string BaseDirectory, bool DoCheck=false)
TChain * CreateChainFromList_opt |
( |
std::string |
ListFileName, |
|
|
std::string |
ChainName, |
|
|
std::string |
BaseDirectory, |
|
|
bool |
DoCheck = false |
|
) |
| |
Definition at line 34 of file AssembleSingleFile.C.
References f.
Referenced by AssembleSingleFile().
39 std::ifstream
InputFile(ListFileName.c_str());
42 TChain* TheChain =
new TChain(ChainName.c_str());
44 while (getline(InputFile, FileName)) {
45 FileName = BaseDirectory + FileName;
46 std::cout << FileName.c_str() << std::endl;
47 TheChain->Add(FileName.c_str());
51 while (getline(InputFile, FileName)) {
52 FileName = BaseDirectory + FileName;
53 TFile*
f = TFile::Open(FileName.c_str());
54 if (f->Get(ChainName.c_str())) {
55 std::cout << FileName.c_str() << std::endl;
56 TheChain->Add(FileName.c_str());
59 std::cout <<
"Chain " << ChainName <<
" not found in file " << FileName << std::endl;
void MakeCombinedFile |
( |
std::string |
FileList, |
|
|
std::string |
BaseDirectory, |
|
|
std::string |
OutputName |
|
) |
| |