Print

Print


Here's an example of what evio2xml gives for hps_003446.evio.10, note the
57615 bank and the correct run number (0xd76).


<!-- ===================== Buffer 72 contains 217 words (868 bytes) ===================== -->

<event format="evio" count="72" content="bank" data_type="0x10" tag="1" padding="0" num="204" length="217" ndata="215">
   <bank content="uint32" data_type="0x1" tag="49152" padding="0" num="0" length="5" ndata="3">
                0x50            0x1              0
   </bank>
   <bank content="bank" data_type="0xe" tag="46" padding="0" num="80" length="26" ndata="24">
      <uint32 data_type="0x1" tag="57610" padding="0" num="39" length="6" ndata="4">
              0x2010003           0x50     0x94b033eb              0
      </uint32>
      <uint32 data_type="0x1" tag="57612" padding="0" num="39" length="11" ndata="9">
             0x92800050     0x98b033e8           0x94     0xa18450ee            0x6
             0xa106cf75           0x11     0xa19174b9           0x11
      </uint32>
      <uint32 data_type="0x1" tag="57615" padding="0" num="0" length="7" ndata="5">
                      0          0xd76           0x50     0x54957a44            0x1
      </uint32>



And I also just now tried to just find the existence of this bank in the same EVIO file
using hps-java by modifying LCSimTestRunEventBuilder.getEventData, and
found it.  Here's a code snippet:


    protected EventHeader getEventData(EvioEvent evioEvent) {
        int[] eventID = null;
        //array of length 3: {event number, trigger code, readout status}

        List<TriggerData> triggerList = getTriggerData(evioEvent);

        if (evioEvent.getChildCount() > 0) {
            for (BaseStructure bank : evioEvent.getChildren()) {
                if (bank.getHeader().getTag() == EvioEventConstants.EVENTID_BANK_TAG) {
                    eventID = bank.getIntData();
                }
                System.out.println("-----NABO   "+bank.getHeader().getTag());
                if (bank.getChildren()!=null)
                {
                    for (BaseStructure bank2 : bank.getChildren()) {
                        System.out.println(bank2.getHeader().getTag());
                        if (bank2.getHeader().getTag()==57615)
                        {
                            System.out.println("asdfjkl;asdfjkl;asdfjklasdfjkl;asdfjlk;asdflkjasdfl;kajsf");
                        }


And a corresponding printout snippet:
-----NABO   46
57610
57612
57615
asdfjkl;asdfjkl;asdfjklasdfjkl;asdfjlk;asdflkjasdfl;kajsf
-----NABO   37
57610
57602


So this bank definitely exists.   Probably your issue is it is a nested bank.

-Nathan






On Jan 13, 2015, at 6:48 PM, "McCormick, Jeremy I." <[log in to unmask]> wrote:

> Okay, then maybe I’m doing something wrong.
> 
> Basically I try to get the head bank as follows….
> 
>     public static BaseStructure getHeadBank(EvioEvent evioEvent) {
>         for (BaseStructure bank : evioEvent.getChildren()) {
>             if (bank.getHeader().getTag() == EvioEventConstants.HEAD_BANK_TAG) {
>                 return bank;
>             }
>         }
>         return null;        
>     }
> 
> where 
> 
> HEAD_BANK_TAG = 0xe10F;
> 
> and evioEvent is a physics event.
> 
> I don’t seem to see any of these banks.
> 
> How do you access this information?
> 
> On Jan 13, 2015, at 3:04 PM, Nathan Baltzell <[log in to unmask]> wrote:
> 
>> Hi Jeremy,
>> 
>> I checked out a few, and every one I’ve looked at has this head bank, including run 3446,
>> within 40 events of the beginning of the file.  Can you check again?
>> 
>> Yes, of course we must have run number in every event.  And it was, until something happened
>> and we just now noticed.  I’m sure Sergey can fix it for next run ….
>> 
>> -Nathan
>> 
>> 
>> 
>> On Jan 13, 2015, at 14:56, McCormick, Jeremy I. <[log in to unmask]> wrote:
>> 
>>> Okay, I’m looking at various files now.  Run 3446 doesn’t have any of these records in the first ~100 events.  So are the head banks not present at all in non-blocking mode?  (Seems to be the case from what I’m seeing.)
>>> 
>>> I’m going to take a look at some of the other files from runs you marked as “blocking” in your run list to see if I can pick out the run banks from them.
>>> 
>>> In the future, could this information be put into every physics event?
>>> 
>>> Basically, what I’m trying to do here is automatically setup run-based conditions when no pre start event is received as the first event in processing.  If the job does not start with the “.evio.0” file then the user has to provide a run number via the command line or the ConditionsDriver, or the job dies.  I think this is pretty clunky and prone to error (in fact it would be preferable if this is completely hidden from end users), so I would prefer if this could be done automatically on an event by event basis if necessary.  
>>> 
>>> This would also be very useful for the monitoring application if you connect to a run and do not catch a pre start event.  Similarly, if the pre start event is not processed, then the run number has to be provided manually via the GUI.
>>> 
>>> Or does adding this to every event add too much overhead?  (I guess it is basically 5 extra int values plus the header block information and tag, etc.)
>>> 
>>> On Jan 13, 2015, at 7:27 AM, Nathan Baltzell <[log in to unmask]> wrote:
>>> 
>>>> Jeremy,
>>>> 
>>>> Turns out for data taken in blocking mode for the commissioning run, this 57615 bank is only
>>>> present every 40 events (block). 
>>>> 
>>>> -Nathan
>>>> 
>>>> 
>>>> On Jan 12, 2015, at 14:48, McCormick, Jeremy I. <[log in to unmask]> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> More on run numbers in the physics events….
>>>>> 
>>>>> I dumped the first event of run 3446.  (See attached.)
>>>>> 
>>>>> I’m not seeing a bank with tag ‘0xe10F’ or its decimal equivalent.
>>>>> 
>>>>> So I’m not sure this is correct….
>>>>> 
>>>>> "We have now head bank (tag=0xe10F)”
>>>>> 
>>>>> I do see some banks with 5 ints but they don’t make sense according to the previously described scheme…
>>>>> 
>>>>> "word 0 = 0 (version number, zero so far)
>>>>> word 1 = run number
>>>>> word 2 = event number
>>>>> word 3 = event unix time
>>>>> word 4 = event type (=1 for now)”
>>>>> 
>>>>> Can you please confirm for me whether this information is actually present in the ECAL Eng Run data.
>>>>> 
>>>>> If so can you tell me how to access it?
>>>>> 
>>>>> It is possible my code is not right, but the XML kind of suggests to me that the previously described bank is not there in the expected form.
>>>>> 
>>>>> Thanks.
>>>>> 
>>>>> —Jeremy
>>>>> 
>>>>> 
>>>>> <example_event.xml>
>>>> 
>>> 
>> 
> 

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1