Sources/src/FromCorsikaBinary_source.cc
void CorsikaBinaryDetail::managePrincipals ( int runNumber,
                                          int subRunNumber,
                                          int eventNumber,
                                          art::RunPrincipal*&    outR,
                                          art::SubRunPrincipal*& outSR,
                                          art::EventPrincipal*&  outE){

    art::Timestamp ts;

    art::SubRunID newID(runNumber, subRunNumber);

    if(newID != lastSubRunID_) {
      // art takes ownership of the object pointed to by outSR and will delete it at the appropriate time.
      outR = pm_.makeRunPrincipal(runNumber, ts);
      outSR = pm_.makeSubRunPrincipal(runNumber,
                                      subRunNumber,
                                      ts);

    }
    lastSubRunID_ = newID;

    // art takes ownership of the object pointed to by outE and will delete it at the appropriate time.
    outE = pm_.makeEventPrincipal(runNumber, subRunNumber, eventNumber, ts, false);

  }
// Each time that we encounter a new run, a new subRun or a new event, we need to make a new principal
// of the appropriate type.  This code does not need to change as the number and type of data products changes.
Each time that we encounter a new run, a new subRun or a new event, we need to make a new principal
of the appropriate type.  This code does not need to change as the number and type of data products changes.
Each time that we encounter a new run a new subRun or a new event we need to make a new principal of the appropriate type . This code does not need to change as the number and type of data products changes .
void CorsikaBinaryDetail::managePrincipals ( int runNumber,
                                          int subRunNumber,
                                          int eventNumber,
                                          art::RunPrincipal*&    outR,
                                          art::SubRunPrincipal*& outSR,
                                          art::EventPrincipal*&  outE){
    art::Timestamp ts;
    art::SubRunID newID(runNumber, subRunNumber);
    if(newID != lastSubRunID_) {
      outR = pm_.makeRunPrincipal(runNumber, ts);
      outSR = pm_.makeSubRunPrincipal(runNumber,
                                      subRunNumber,
                                      ts);
    }
    lastSubRunID_ = newID;
    outE = pm_.makeEventPrincipal(runNumber, subRunNumber, eventNumber, ts, false);
  }
void CorsikaBinaryDetail :: managePrincipals ( int runNumber , int subRunNumber , int eventNumber , art :: RunPrincipal * & outR , art :: SubRunPrincipal * & outSR , art :: EventPrincipal * & outE ) { art :: Timestamp ts ; art :: SubRunID newID ( runNumber , subRunNumber ) ; if ( newID != lastSubRunID_ ) { outR = pm_ . makeRunPrincipal ( runNumber , ts ) ; outSR = pm_ . makeSubRunPrincipal ( runNumber , subRunNumber , ts ) ; } lastSubRunID_ = newID ; outE = pm_ . makeEventPrincipal ( runNumber , subRunNumber , eventNumber , ts , false ) ; }
Each time that we encounter a new run, a new subRun or a new event, we need to make a new principal
of the appropriate type.
Each time that we encounter a new run a new subRun or a new event we need to make a new principal of the appropriate type .
// art takes ownership of the object pointed to by outSR and will delete it at the appropriate time. // art takes ownership of the object pointed to by outE and will delete it at the appropriate time.