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

TRestRawSignalChannelActivityProcess. Moving fReadout after data members #81

Closed
wants to merge 1 commit into from

Conversation

jgalan
Copy link
Member

@jgalan jgalan commented Sep 10, 2022

jgalan Ok: 10

There was a problem retrieving the metadata members of the process TRestRawSignalChannelActivityProcess. I found out that moving the fReadout pointer after the data members solves the problem.

I used the following RML definition for testing.

<xml>
    <TRestRawSignalChannelActivityProcess name="rawChActivity" value="ON" verboseLevel="info" >
        <parameter name="lowThreshold" value="25" />
        <parameter name="highThreshold" value="30" />
        <parameter name="daqHistogramChannels" value="360" />
        <parameter name="daqStartChannel" value="4320" />
        <parameter name="daqEndChannel" value="4360" />
        <parameter name="readoutHistogramChannels" value="250" />
        <parameter name="readoutStartChannel" value="0" />
        <parameter name="readoutEndChannel" value="250" />
    </TRestRawSignalChannelActivityProcess>
</xml>

The values before the fix were not correct, as shown here.

root [0] TRestRawSignalChannelActivityProcess t("test.rml")
(TRestRawSignalChannelActivityProcess &) Name: rawChActivity Title: Default TRestRawSignalChannelActivityProcess
root [1] t.PrintMetadata()

                                  ====================================================================================================                                     
                                  ||                         Process : TRestRawSignalChannelActivityProcess                         ||                                     
                                  ||  Name: rawChActivity  Title: Default TRestRawSignalChannelActivityProcess  VerboseLevel: info  ||                                     
                                  ||                        -----------------------------------------------                         ||                                     
                                  ||                                                                                                ||                                     
                                  ||                               Low signal threshold activity : 30                               ||                                     
                                  ||                              High signal threshold activity : 50                               ||                                     
                                  ||                            Number of daq histogram channels : 4320                             ||                                     
                                  ||                                     Start daq channel : 0                                      ||                                     
                                  ||                                     End daq channel : 250                                      ||                                     
                                  ||                          Number of readout histogram channels : 4360                           ||                                     
                                  ||                                   Start readout channel : 0                                    ||                                     
                                  ||                                   End readout channel : 128                                    ||                                     
                                  ||                                                                                                ||                                     
                                  ====================================================================================================                        

After moving the fReadout pointer one gets the right values.

root [0] TRestRawSignalChannelActivityProcess t("test.rml")
(TRestRawSignalChannelActivityProcess &) Name: rawChActivity Title: Default TRestRawSignalChannelActivityProcess
root [1] t.PrintMetadata()

                                  ====================================================================================================                                     
                                  ||                         Process : TRestRawSignalChannelActivityProcess                         ||                                     
                                  ||  Name: rawChActivity  Title: Default TRestRawSignalChannelActivityProcess  VerboseLevel: info  ||                                     
                                  ||                        -----------------------------------------------                         ||                                     
                                  ||                                                                                                ||                                     
                                  ||                               Low signal threshold activity : 25                               ||                                     
                                  ||                              High signal threshold activity : 30                               ||                                     
                                  ||                             Number of daq histogram channels : 300                             ||                                     
                                  ||                                    Start daq channel : 4320                                    ||                                     
                                  ||                                     End daq channel : 4360                                     ||                                     
                                  ||                           Number of readout histogram channels : 128                           ||                                     
                                  ||                                   Start readout channel : 0                                    ||                                     
                                  ||                                   End readout channel : 250                                    ||                                     
                                  ||                                                                                                ||                                     
                                  ====================================================================================================         

I am not sure why this problem is happening, I remember it happened before and we discussed a bit about it. But why the fSignalEvent pointer is not causing problem and fReadout it is? It would be good to understand the cause so that we can add a validation pipeline to prevent this behaviour. Probably @nkx knows the reason of this.

@jgalan
Copy link
Member Author

jgalan commented Sep 10, 2022

Actually this was solved at #72 So lets close this PR and merge #72

@jgalan jgalan closed this Sep 10, 2022
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.

1 participant