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

Add good event flag to ETOF headers and StPicoEvent #160

Merged
merged 24 commits into from
Nov 4, 2021

Conversation

PhilippWeidenkaff
Copy link
Contributor

This pull request adds a flag for each counter to the eTOF headers and StPicoEvent. The flag shows if a counter is good for analysis in a given event. Should be implemented before production of 2020 data.

Additional changes to the StETofCalibMaker have been made to include features needed for local calibrations into the official code and introduce additional monitoring (neither of this is relevant to production running).

in StMuDstMaker, <strstring.h> header was included to be able to compile it. This is not an intentional change on my side and if this issue has been fixed in another way, please ignore it.

Philipp Weidenkaff and others added 6 commits June 3, 2021 11:01
…l setters from etofIn001 version of this file. Needed to unpack Get4Status bit into event files
…librations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.
…librations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.
@@ -349,7 +349,7 @@ class StPicoDstMaker : public StMaker {
return cvs;
}

ClassDef(StPicoDstMaker, 0)
ClassDef(StPicoDstMaker, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should stay at zero unless you plan to use streamers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in latest commit

Comment on lines +85 to +99
StETofHeader::StETofHeader( const double& trgGdpbTime, const double& trgStarTime,
const map< unsigned int, uint64_t >& gdpbTs, const map< unsigned int, uint64_t >& starTs,
const unsigned int& starToken, const unsigned int& starDaqCmdIn, const unsigned int& starTrgCmdIn,
const uint64_t& eventStatusFlag, const std::vector<bool>& MissMatchFlagVec, const std::vector<bool>& GoodEventFlagVec )
: mTrgGdpbFullTime( trgGdpbTime ),
mTrgStarFullTime( trgStarTime ),
mStarToken( starToken ),
mStarDaqCmdIn( starDaqCmdIn ),
mStarTrgCmdIn( starTrgCmdIn ),
mEventStatusFlag( eventStatusFlag ),
mMissMatchFlagVec( MissMatchFlagVec ),
mGoodEventFlagVec( GoodEventFlagVec )
{
setRocGdpbTs( gdpbTs );
setRocStarTs( starTs );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use delegating constructors to reduce all of this boireplate code for StETofHeader constructors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be a good suggestion, but IMO it leans into refactoring of the existing code. Would be nice to see it, but in a separate PR?

@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Oct 20, 2021 via email

@starsdong
Copy link
Member

Philipp,

Have you resolved the slowness of the rebase? Do you need help from Dmitry or Hongwei on this? Thanks

@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Oct 28, 2021 via email

…base. Decremented etof collection ClassDef for real this time
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM

@starsdong
Copy link
Member

Do we need another review/approval from one of the code onwers so the merge can be initiated?


//_________________
bool StPicoEvent::eTofGoodEventFlag( UShort_t iSector, UShort_t iModule, UShort_t iCounter ) const {
if( iSector < 13 || iSector > 24 ){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @PhilippWeidenkaff , I would suggest to change some hardcoded numbers later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks okay and could be merged.

@starsdong
Copy link
Member

Grigory, if you can approve the PR so we can merge this in. Thanks

@plexoos plexoos changed the title eTOF goodEventFlag Add good event flag to ETOF headers and StPicoEvent Nov 4, 2021
@plexoos plexoos merged commit 1785293 into star-bnl:main Nov 4, 2021
@genevb genevb mentioned this pull request Nov 5, 2021
@genevb
Copy link
Contributor

genevb commented Nov 5, 2021

It appears that several nightly test jobs failed last night after this commit. Issue #181 opened.

jml985 pushed a commit that referenced this pull request Dec 7, 2021
* fixed 64b integer conversion in getField() method and added additional setters from etofIn001 version of this file. Needed to unpack Get4Status bit into event files

* merged with group development to have support for local run-by-run calibrations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.

* merged with group development to have support for local run-by-run calibrations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.

* <strstring.h> header include needed to be added for local compilation (?)

* added eTofGoodEventFlag to mark counters which are good foer analysis in each event

* moved struct to public to avoid root6 issue. Changed class dev version back to 0

* added kStFatal return in ::init if calib histo files are corrupt

* Changed class dev version back to 0

* Trying to fix merger

* Trying to fix merger

* added eTofGoodEventFlag to mark counters which are good foer analysis in each event

* moved struct to public to avoid root6 issue. Changed class dev version back to 0

* added kStFatal return in ::init if calib histo files are corrupt

* Changed class dev version back to 0

* decremented classDef version of StEtofCollection. Makers compile correct header version after rebase without increment

* removed double line in MuEtofHeader constructor

* included eTOF constants header and moved constants here

* included eTOF constants header and moved constants here

* added constant nbGet4s here for use in event headers

* Removed strstr include in StMuDstMaker.cxx. Now indentical to repository version

* Moved vector init in eTOF headers to initializer list

* Changed default reference pulser setting in calib maker back to data base. Decremented etof collection ClassDef for real this time

Co-authored-by: Philipp Weidenkaff <weidenkaff@rcas6005.rcf.bnl.gov>
Co-authored-by: PhilippWeidenkaff <weidenkaff@physi.uni-heildeberg.de>
marrbnl pushed a commit that referenced this pull request Dec 8, 2021
* fixed 64b integer conversion in getField() method and added additional setters from etofIn001 version of this file. Needed to unpack Get4Status bit into event files

* merged with group development to have support for local run-by-run calibrations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.

* merged with group development to have support for local run-by-run calibrations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.

* <strstring.h> header include needed to be added for local compilation (?)

* added eTofGoodEventFlag to mark counters which are good foer analysis in each event

* moved struct to public to avoid root6 issue. Changed class dev version back to 0

* added kStFatal return in ::init if calib histo files are corrupt

* Changed class dev version back to 0

* Trying to fix merger

* Trying to fix merger

* added eTofGoodEventFlag to mark counters which are good foer analysis in each event

* moved struct to public to avoid root6 issue. Changed class dev version back to 0

* added kStFatal return in ::init if calib histo files are corrupt

* Changed class dev version back to 0

* decremented classDef version of StEtofCollection. Makers compile correct header version after rebase without increment

* removed double line in MuEtofHeader constructor

* included eTOF constants header and moved constants here

* included eTOF constants header and moved constants here

* added constant nbGet4s here for use in event headers

* Removed strstr include in StMuDstMaker.cxx. Now indentical to repository version

* Moved vector init in eTOF headers to initializer list

* Changed default reference pulser setting in calib maker back to data base. Decremented etof collection ClassDef for real this time

Co-authored-by: Philipp Weidenkaff <weidenkaff@rcas6005.rcf.bnl.gov>
Co-authored-by: PhilippWeidenkaff <weidenkaff@physi.uni-heildeberg.de>
plexoos added a commit that referenced this pull request Oct 24, 2022
Fixes bug introduced in #160

Co-authored-by: PhilippWeidenkaff <weidenkaff@physi.uni-heildeberg.de>
Co-authored-by: Dmitri Smirnov <dmixsmi@gmail.com>
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.

9 participants