Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readout generation #96

Merged
merged 11 commits into from
Jul 6, 2023
Merged

Update readout generation #96

merged 11 commits into from
Jul 6, 2023

Conversation

juanangp
Copy link
Member

@juanangp juanangp commented Jul 4, 2023

juanangp Large: 2999

Updating readout generation:

  • The readout is not generated at InitFromConfigFile, only the rml metadata is readed.
  • Some metadata members from TRestDetectorReadout have been moved to TRestDetectorReadoutModule : fFirstDaqChannel, fMappingNodes and fDecoding since they belong to TRestDetectorReadoutModule, e.g. decoding happens there.
  • Added option to update the decoding after the readout has been generated, therefore to avoid long readout generation just for decoding test, a macro has been added, see an example below:
TFile *f = TFile::Open("myReadout.root", "UPDATE");
TRestDetectorReadout* readout = (TRestDetectorReadout*)f->Get("readoutName");
  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);
      }
  }
readout->Write("newDecoding");
f->Close();

@juanangp juanangp requested review from jgalan and lobis July 4, 2023 10:26
@jgalan
Copy link
Member

jgalan commented Jul 5, 2023

Perhaps SetDecodingFile could already call UpdateDecoding?

@juanangp
Copy link
Member Author

juanangp commented Jul 5, 2023

Perhaps SetDecodingFile could already call UpdateDecoding?

Done

@juanangp juanangp closed this Jul 5, 2023
@juanangp juanangp reopened this Jul 5, 2023
@juanangp juanangp merged commit 3bb1d12 into master Jul 6, 2023
@juanangp juanangp deleted the readout_update branch July 6, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants