-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
1 parent
93a645a
commit 9c8ce94
Showing
4 changed files
with
89 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
void REST_Detector_UpdateDecoding (const std::string& rootFile, const std::string &readoutName, const std::string & decodingFile ) { | ||
void REST_Detector_UpdateDecoding(const std::string& rootFile, const std::string& readoutName, | ||
const std::string& decodingFile) { | ||
TFile* f = TFile::Open(rootFile.c_str(), "UPDATE"); | ||
TRestDetectorReadout* readout = (TRestDetectorReadout*)f->Get(readoutName.c_str()); | ||
|
||
TFile *f = TFile::Open(rootFile.c_str(), "UPDATE"); | ||
TRestDetectorReadout* readout = (TRestDetectorReadout*)f->Get(readoutName.c_str()); | ||
// readout->PrintMetadata(); | ||
|
||
//readout->PrintMetadata(); | ||
for (int p = 0; p < readout->GetNumberOfReadoutPlanes(); p++) { | ||
TRestDetectorReadoutPlane* plane = readout->GetReadoutPlane(p); | ||
for (int m = 0; m < plane->GetNumberOfModules(); m++) { | ||
TRestDetectorReadoutModule* module = &(*plane)[m]; | ||
module->SetDecodingFile(decodingFile); | ||
module->UpdateDecoding(); | ||
} | ||
} | ||
|
||
for( int p = 0; p < readout->GetNumberOfReadoutPlanes(); p++ ){ | ||
TRestDetectorReadoutPlane *plane = readout->GetReadoutPlane( p ); | ||
for( int m = 0; m < plane->GetNumberOfModules(); m++ ) { | ||
TRestDetectorReadoutModule* module = &(*plane)[m]; | ||
module->SetDecodingFile(decodingFile); | ||
module->UpdateDecoding(); | ||
} | ||
} | ||
|
||
readout->Write(readoutName.c_str()); | ||
|
||
f->Close(); | ||
readout->Write(readoutName.c_str()); | ||
|
||
f->Close(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters